DOP-3999 Exclude oldgen jobs from "don't send notifications of non-GC… #122
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v*' | |
concurrency: | |
group: environment-prd-${{ github.ref }} | |
cancel-in-progress: true | |
name: Deploy Production ECS | |
jobs: | |
deploy-prd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '18.x' | |
- name: Install Serverless Framework | |
run: npm install -g serverless | |
- name: Serverless AWS authentication | |
run: sls config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: login-ecr | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Create ECS Repo | |
run: | | |
cd infrastructure/ecs-repo | |
npm ci | |
sls deploy --stage prd | |
sls deploy --stage dotcomprd | |
sls deploy --stage legacydotcomprd | |
- uses: mr-smithers-excellent/docker-build-push@v5 | |
name: build and push to ECR | |
with: | |
image: docs-worker-pool-prd | |
tags: latest, ${{ github.sha }} | |
registry: ${{ steps.login-ecr.outputs.registry }} | |
buildArgs: NPM_EMAIL=${{ secrets.NPM_EMAIL }},NPM_BASE_64_AUTH=${{ secrets.NPM_BASE64_AUTH }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
NPM_BASE_64_AUTH: ${{ secrets.NPM_BASE64_AUTH }} | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
- uses: mr-smithers-excellent/docker-build-push@v5 | |
name: build and push to ECR Dotcom | |
with: | |
image: docs-worker-pool-dotcomprd | |
tags: latest, ${{ github.sha }} | |
registry: ${{ steps.login-ecr.outputs.registry }} | |
buildArgs: NPM_EMAIL=${{ secrets.NPM_EMAIL }},NPM_BASE_64_AUTH=${{ secrets.NPM_BASE64_AUTH }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
NPM_BASE_64_AUTH: ${{ secrets.NPM_BASE64_AUTH }} | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
# - uses: mr-smithers-excellent/docker-build-push@v5 | |
# name: build and push to ECR Legacy Dotcom | |
# with: | |
# image: docs-worker-pool-legacydotcomprd | |
# tags: latest, ${{ github.sha }} | |
# registry: ${{ steps.login-ecr.outputs.registry }} | |
# dockerfile: Dockerfile.legacy | |
# buildArgs: NPM_EMAIL=${{ secrets.NPM_EMAIL }},NPM_BASE_64_AUTH=${{ secrets.NPM_BASE64_AUTH }} | |
# env: | |
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# NPM_BASE_64_AUTH: ${{ secrets.NPM_BASE64_AUTH }} | |
# NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
- name: Deploy ECS | |
run: | | |
cd infrastructure/ecs-main | |
npm ci | |
sls deploy --stage prd | |
sls deploy --stage dotcomprd | |
- name: Deploy Lambdas | |
run: | | |
npm ci | |
sls deploy --stage prd | |
sls deploy --stage dotcomprd | |
sls prune -n 5 |