Deploy via GitLab CI
MCE-3 Order: #3 Datalake Formation Has Dependencies
Updated 1 month, 2 weeks ago
Guidance
Purpose
Deploy the CDK app through GitLab CI with OIDC. Alternative to GitHub Actions.
Inputs
- Lake Scope Contract (
cimust begitlab_ci). - CDK Application.
- Starter
.gitlab-ci.yml.example— copy to.gitlab-ci.yml. Skill GitLab CI/CD → Recipe.
Skip when
ci is github_actions. Running both against one AWS account causes split-brain deploys.
Steps
- Copy
.gitlab-ci.yml.exampleto.gitlab-ci.yml. Do not also keep a live GitHubdeploy.ymlagainst this account. - Chicken-and-egg: laptop
cdk bootstrapthen onecdk deploy OpsLakeDeployto mint the GitLab OIDC IAM role. Store the role ARN as CI/CD variableAWS_DEPLOY_ROLE_ARN(notAWS_ACCESS_KEY_ID). Trustaud=https://gitlab.com(or this instance URL) and the projectsub. id_tokensblock mints the OIDC token. pytest →cdk synth→cdk diff→cdk deploywithwhen: manualfor production. Register GitLab Environmentproduction.- After first deploy, record URLs/ARNs in
docs/deploy-manifest.yaml.
Done when
.gitlab-ci.ymlis the only shared-env deploy path.- GitHub Actions deploy workflow is absent.
- A
mainpipeline assumed the role.
Feeds
Pipeline (populate equivalent on GitLab if you add it; otherwise GitHub populate-lake is the GitHub-ci path).
Details
- Order:
- #3
- Phase:
- Predecessor:
- MCE-2 Model the Data Lake as CDK Stacks
- Created:
- Aug 31, 2026
- Last Updated:
- Sep 17, 2026
Workflow
Model and Deploy Infrastructure as Code
Lock the lake's scope and stand the AWS estate up as code so every later step lands on the same …
View WorkflowAssigned Agent
Data Platform Engineer
Agent: Data Platform Engineer Role Owns Datalake Formation: Scope Contract → Python CDK (DeployStack + …
Required Skills
- GitLab CI/CD DevOps / CI-CD GitLab CI, id_tokens OIDC
Rules
-
Execute by Workflow Order
execute-by-step-labels -
Infrastructure as Code First
infrastructure-as-code-first
Input Artifacts 2
-
CDK Application (Infrastructure Stacks)
Document
Required
Produced by: Model the Data Lake as CDK Stacks -
Lake Scope Contract
Document
Required
Produced by: Scope Sources, Org, and Environment
Output Artifacts 1
- CI Deploy Pipeline (GitLab CI) Document Required