feat: prepare api-gateway for one branch only development

This commit is contained in:
Karol Sójko
2022-06-23 18:34:03 +02:00
parent 100eef2cb8
commit 163b7ff2d8
4 changed files with 54 additions and 35 deletions
+8 -8
View File
@@ -93,7 +93,7 @@ jobs:
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: DEV - Fill in the new image ID in the Amazon ECS task definition
id: task-def
id: task-def-dev
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
@@ -102,7 +102,7 @@ jobs:
- name: DEV - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
task-definition: ${{ steps.task-def-dev.outputs.task-definition }}
service: syncing-server-js-dev
cluster: dev
wait-for-service-stability: true
@@ -113,7 +113,7 @@ jobs:
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: PROD - Fill in the new image ID in the Amazon ECS task definition
id: task-def
id: task-def-prod
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
@@ -122,7 +122,7 @@ jobs:
- name: PROD - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
service: syncing-server-js-prod
cluster: prod
wait-for-service-stability: true
@@ -146,7 +146,7 @@ jobs:
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-worker-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: DEV - Fill in the new image ID in the Amazon ECS task definition
id: task-def
id: task-def-dev
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
@@ -155,7 +155,7 @@ jobs:
- name: DEV - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
task-definition: ${{ steps.task-def-dev.outputs.task-definition }}
service: syncing-server-js-worker-dev
cluster: dev
wait-for-service-stability: true
@@ -166,7 +166,7 @@ jobs:
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-worker-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: PROD - Fill in the new image ID in the Amazon ECS task definition
id: task-def
id: task-def-prod
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
@@ -175,7 +175,7 @@ jobs:
- name: PROD - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
service: syncing-server-js-worker-prod
cluster: prod
wait-for-service-stability: true