Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace gh-ecr-push action for aws-cli-v2 #1871

Merged
merged 1 commit into from
Jun 28, 2022
Merged

Conversation

gweiying
Copy link
Contributor

@gweiying gweiying commented Jun 27, 2022

Problem

What problem are you trying to solve? What issue does this close?

Our Github action workflow opengovsg/gh-ecr-push@v1 no longer works on Github's Ubuntu 18 virtual machines as the virtual machines have updated their AWS CLI installation to AWS CLI v2. As a result, the command aws ecr get-login (line 26) is deprecated, causing our CI/CD runs to break.

Solution

How did you solve the problem?

Initially, we considered 1) pulling the newest version from the original upstream or 2) updating our OGP fork specifically to be compatible with AWS CLI v2.

However, following FormSg and Redeem's new patterns, I've instead swapped the workflow out to use the official AWS Actions, aws-actions/configure-aws-credentials@v1 and aws-actions/amazon-ecr-login@v1 for logging in, and to run the Docker build, tag and push commands separately.

Tests

What tests should be run to confirm functionality?

  • Test deployment pipeline on edge
    • Deployment should complete successfully
    • Latest images should be in ECR
    • EB should use latest images from ECR
    • Staging environment should be working/ pass manual tests

Copy link
Contributor

@thanhdatle thanhdatle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me

@gweiying gweiying merged commit 8301912 into develop Jun 28, 2022
@gweiying gweiying deleted the fix/gh-action branch October 7, 2022 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants