-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathairflow_buildspec.yml
More file actions
27 lines (25 loc) · 1.04 KB
/
airflow_buildspec.yml
File metadata and controls
27 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
version: 0.2
env:
variables:
BUILD_ROOT: "images/airflow"
phases:
pre_build:
commands:
- echo logging into ECR
- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
- npm install -g aws-cdk@1.90.0
- npm update
- python -m pip install -r infra/requirements.txt
build:
commands:
- echo Entered the build phase for Airflow...
- docker build -t $REPOSITORY_URI/airflow_webserver_cdk:$IMAGE_TAG -f $BUILD_ROOT/webserver.Dockerfile $BUILD_ROOT
- docker build -t $REPOSITORY_URI/airflow_scheduler_cdk:$IMAGE_TAG -f $BUILD_ROOT/scheduler.Dockerfile $BUILD_ROOT
- docker build -t $REPOSITORY_URI/airflow_worker_cdk:$IMAGE_TAG -f $BUILD_ROOT/worker.Dockerfile $BUILD_ROOT
post_build:
commands:
- echo Pushing Airflow docker images...
- docker push $REPOSITORY_URI/airflow_webserver_cdk:$IMAGE_TAG
- docker push $REPOSITORY_URI/airflow_scheduler_cdk:$IMAGE_TAG
- docker push $REPOSITORY_URI/airflow_worker_cdk:$IMAGE_TAG
- make codebuild_deploy_airflow