Skip to content

Cleaning up jest setup/mocking #71

Cleaning up jest setup/mocking

Cleaning up jest setup/mocking #71

Workflow file for this run

# Deploys to nypl-dams-dev.
name: deploy qa
on:
push:
branches:
- qa
- DR-3325/clean-up-logging
permissions:
id-token: write
contents: read
env:
AWS_DEFAULT_REGION: us-east-1
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::685731035297:role/GithubActionsDeployerRole
aws-region: us-east-1
- name: Sanitize LOCAL_TAG_NAME
id: define_tag
run: |
SANITIZED_REF_NAME=$(echo "${{github.ref_name}}" | tr '/' '-')
echo "LOCAL_TAG_NAME=dc-frontend:${SANITIZED_REF_NAME}-${{ github.run_number }}" >> $GITHUB_ENV
- name: Log in to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build and push Docker image to Amazon ECR
env:
APP_ENV: qa
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
API_URL: ${{ secrets.API_URL }}
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
ECR_URL: 685731035297.dkr.ecr.us-east-1.amazonaws.com/dc-frontend:qa-latest
run: |
docker build --build-arg APP_ENV=$APP_ENV --build-arg NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY --build-arg API_URL=$API_URL --build-arg AUTH_TOKEN=$AUTH_TOKEN --tag $LOCAL_TAG_NAME .
docker tag $LOCAL_TAG_NAME $ECR_URL
docker push $ECR_URL
- name: Update ECS service
run: |
aws ecs update-service --cluster dc-frontend-qa --service dc-frontend-qa --force-new-deployment