This repository was archived by the owner on Mar 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-20
lines changed
Expand file tree Collapse file tree 1 file changed +15
-20
lines changed Original file line number Diff line number Diff line change 11# This template uses AWS CDK and AWS CLI to make infrastrcutre updates
22# and to deploy changes to the frontend and backend
33
4+ workflow :
5+ rules :
6+ - if : ' $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
7+ when : always
8+
49variables :
510 ENVIRONMENT : dev
611
@@ -60,39 +65,29 @@ cdk deploy:
6065 Name=tag:StackName,Values=${ENVIRONMENT}-${APP_NAME} \
6166 Name=tag:aws-cdk:subnet-type,Values=Public \
6267 | jq -r '.Subnets | map(.SubnetId) | join(",")')
63-
64- collectstatic :
65- << : *task
6668 script :
6769 - |
6870 aws ecs run-task \
6971 --cluster ${ENVIRONMENT}-${APP_NAME}-cluster \
70- --task-definition ${ENVIRONMENT}-${APP_NAME}-collectstatic \
72+ --task-definition ${ENVIRONMENT}-${APP_NAME}-${TASK_SUFFIX} \
7173 --network-configuration "awsvpcConfiguration={subnets=[${subnets}],assignPublicIp=ENABLED}" \
7274 --count 1 \
7375 --launch-type FARGATE
7476
77+ collectstatic :
78+ << : *task
79+ variables :
80+ TASK_SUFFIX : collectstatic
81+
7582migrate :
7683 << : *task
77- script :
78- - |
79- aws ecs run-task \
80- --cluster ${ENVIRONMENT}-${APP_NAME}-cluster \
81- --task-definition ${ENVIRONMENT}-${APP_NAME}-migrate \
82- --network-configuration "awsvpcConfiguration={subnets=[${subnets}],assignPublicIp=ENABLED}" \
83- --count 1 \
84- --launch-type FARGATE
84+ variables :
85+ TASK_SUFFIX : migrate
8586
8687createsuperuser :
8788 << : *task
88- script :
89- - |
90- aws ecs run-task \
91- --cluster ${ENVIRONMENT}-${APP_NAME}-cluster \
92- --task-definition ${ENVIRONMENT}-${APP_NAME}-create-superuser \
93- --network-configuration "awsvpcConfiguration={subnets=[${subnets}],assignPublicIp=ENABLED}" \
94- --count 1 \
95- --launch-type FARGATE
89+ variables :
90+ TASK_SUFFIX : create-superuser
9691
9792cdk destroy :
9893 image : python:3.8
You can’t perform that action at this time.
0 commit comments