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

SFR-2403: Add rollback step #584

Merged
merged 7 commits into from
Jan 10, 2025
Merged

SFR-2403: Add rollback step #584

merged 7 commits into from
Jan 10, 2025

Conversation

jackiequach
Copy link
Collaborator

Jira Ticket

This PR does the following:

  • Add rollback step to CI/CD to rollback to the previous deployed image
  • Update lingering production branch refs

Testing requirements & instructions:

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sfr-bookfinder-front-end ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 6:40pm

Comment on lines +70 to +71
MANIFEST=$(aws ecr batch-get-image --repository-name $ECR_REPOSITORY --image-ids imageTag="production-latest" --output json | jq --raw-output --join-output '.images[0].imageManifest')
aws ecr put-image --repository-name $ECR_REPOSITORY --image-tag "production-previous" --image-manifest "$MANIFEST"
Copy link
Contributor

Choose a reason for hiding this comment

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

nice - i like this!

@@ -23,3 +23,42 @@ jobs:
needs: run_e2e_tests
uses: NYPL/sfr-bookfinder-front-end/.github/workflows/build-production.yaml@main
secrets: inherit

# Rollback job in case of failure (Revert production to the previous task definition)
rollback:
Copy link
Contributor

Choose a reason for hiding this comment

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

What are your thoughts on creating a separate workflow for the rollback?

I think you'll need to add an on block:

on:
  workflow_dispatch:
...

@kylevillegas93
Copy link
Contributor

Looks great!

@jackiequach jackiequach merged commit 5e3b2ea into main Jan 10, 2025
8 checks passed
@jackiequach jackiequach deleted the SFR-2403/add-rollback-step branch January 10, 2025 20:37
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