diff --git a/.github/workflows/api-gateway.release.yml b/.github/workflows/api-gateway.release.yml index f16836afd..8eca02592 100644 --- a/.github/workflows/api-gateway.release.yml +++ b/.github/workflows/api-gateway.release.yml @@ -114,40 +114,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition api-gateway-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - run: | - jq '(.containerDefinitions[] | select(.name=="api-gateway-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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: api-gateway-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/api-gateway:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: api-gateway-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition api-gateway-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition run: | jq '(.containerDefinitions[] | select(.name=="api-gateway-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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: api-gateway-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/api-gateway:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} diff --git a/.github/workflows/auth.release.yml b/.github/workflows/auth.release.yml index ba1502383..1b27970d0 100644 --- a/.github/workflows/auth.release.yml +++ b/.github/workflows/auth.release.yml @@ -117,40 +117,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition auth-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - run: | - jq '(.containerDefinitions[] | select(.name=="auth-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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: auth-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: auth-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition auth-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition run: | jq '(.containerDefinitions[] | select(.name=="auth-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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: auth-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} @@ -170,40 +150,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition auth-worker-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - run: | - jq '(.containerDefinitions[] | select(.name=="auth-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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: auth-worker-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: auth-worker-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition auth-worker-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition run: | jq '(.containerDefinitions[] | select(.name=="auth-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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: auth-worker-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} diff --git a/.github/workflows/event-store.release.yml b/.github/workflows/event-store.release.yml index ca0f709cf..49987b5c9 100644 --- a/.github/workflows/event-store.release.yml +++ b/.github/workflows/event-store.release.yml @@ -88,20 +88,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition event-store-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition run: | jq '(.containerDefinitions[] | select(.name=="event-store-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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: event-store-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/event-store:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} diff --git a/.github/workflows/files.release.yml b/.github/workflows/files.release.yml index a907d0d04..ef916a8a4 100644 --- a/.github/workflows/files.release.yml +++ b/.github/workflows/files.release.yml @@ -117,40 +117,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition files-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - run: | - jq '(.containerDefinitions[] | select(.name=="files-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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: files-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/files:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: files-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition files-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition run: | jq '(.containerDefinitions[] | select(.name=="files-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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: files-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/files:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} @@ -170,40 +150,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition files-worker-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - run: | - jq '(.containerDefinitions[] | select(.name=="files-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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: files-worker-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/files:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: files-worker-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition files-worker-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition run: | jq '(.containerDefinitions[] | select(.name=="files-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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: files-worker-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/files:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} diff --git a/.github/workflows/scheduler.release.yml b/.github/workflows/scheduler.release.yml index cfd6c99ad..87dc2e7fa 100644 --- a/.github/workflows/scheduler.release.yml +++ b/.github/workflows/scheduler.release.yml @@ -88,40 +88,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition scheduler-worker-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - run: | - jq '(.containerDefinitions[] | select(.name=="scheduler-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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: scheduler-worker-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/scheduler-worker:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: scheduler-worker-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition scheduler-worker-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition run: | jq '(.containerDefinitions[] | select(.name=="scheduler-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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: scheduler-worker-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/scheduler-worker:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} diff --git a/.github/workflows/syncing-server.release.yml b/.github/workflows/syncing-server.release.yml index a2f06d216..25a21a7b0 100644 --- a/.github/workflows/syncing-server.release.yml +++ b/.github/workflows/syncing-server.release.yml @@ -117,40 +117,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition syncing-server-js-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - 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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: syncing-server-js-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/syncing-server-js:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: syncing-server-js-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition syncing-server-js-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition 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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: syncing-server-js-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/syncing-server-js:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }} @@ -170,40 +150,20 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: DEV - Download task definition - run: | - aws ecs describe-task-definition --task-definition syncing-server-js-worker-dev --query taskDefinition > task-definition.json - - name: DEV - Fill in the new version in the Amazon ECS task definition - 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-dev - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: syncing-server-js-worker-dev - image: ${{ secrets.AWS_ECR_REGISTRY }}/syncing-server-js:${{ github.sha }} - - name: DEV - Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def-dev.outputs.task-definition }} - service: syncing-server-js-worker-dev - cluster: dev - wait-for-service-stability: true - - name: PROD - Download task definition + - name: Download task definition run: | aws ecs describe-task-definition --task-definition syncing-server-js-worker-prod --query taskDefinition > task-definition.json - - name: PROD - Fill in the new version in the Amazon ECS task definition + - name: Fill in the new version in the Amazon ECS task definition 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 + - name: Fill in the new image ID in the Amazon ECS task definition id: task-def-prod uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json container-name: syncing-server-js-worker-prod image: ${{ secrets.AWS_ECR_REGISTRY }}/syncing-server-js:${{ github.sha }} - - name: PROD - Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def-prod.outputs.task-definition }}