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

chore: deploy to production became optional with choice for the image_tag #226

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

geekbrother
Copy link
Contributor

@geekbrother geekbrother commented Sep 29, 2023

Description

This PR changes the release and cd GitHub Actions workflows to the following:

Release:

  • Adding user inputs for the release for options to deploy to staging and/or prod environments after the release is made.

CD:

  • Making deployment to the staging and prod optional for the cd workflow by adding the ability to choose to which environment the image should be deployed when cd is invoked.
  • Adding image_tag string input for the cd to make the ability to choose which image version/tag from ECR should be deployed. The default blank input value is the latest release version/tag. This adds an ability to test staging releases by deploying into staging only and falls back to the previous version in case we need to roll it back without making a revert commit and make another release.

Resolves #224

How Has This Been Tested?

Tested by the GitHub Actions VSCode plugin by checking validations.
Smoke testing in a forked repo.
Should be tested when merged as well.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@geekbrother geekbrother added the area-github GitHub Actions label Sep 29, 2023
@geekbrother geekbrother self-assigned this Sep 29, 2023
@arein arein added the accepted The issue has been accepted into the project label Sep 29, 2023
@geekbrother geekbrother force-pushed the max/chore/make_prod_optional branch 2 times, most recently from 74a1b28 to 6a7310d Compare October 1, 2023 19:58
@geekbrother geekbrother changed the title chore: making deploy to production optional chore: deploy to production became optional with choice for the image_tag Oct 1, 2023
@geekbrother geekbrother force-pushed the max/chore/make_prod_optional branch from 6a7310d to 2a1fc24 Compare October 1, 2023 20:02
@@ -21,41 +38,12 @@ concurrency:
cancel-in-progress: false

jobs:
get-version:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need this anymore, because we can get the latest release version from the input image_tag when calling from the release, or it's getting by the terraform itself when passing an empty one.

@geekbrother geekbrother marked this pull request as ready for review October 1, 2023 20:23
Copy link
Contributor

@xav xav left a comment

Choose a reason for hiding this comment

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

I'm approving if this is blocking you, otherwise, I'm not sure about latest since versioned tags haven't really been a problem and a generic one can be tricky sometimes.
Anyway, this will be overwritten with the migration.

@geekbrother
Copy link
Contributor Author

Anyway, this will be overwritten with the migration.

@xav do you mean by migration of the future updates of the CD workflow to make it consistent across all services?
The reason for these changes is to control what version we are shipping to prod and distinguish to which environment to ship. At the moment it's kind of messy.

@geekbrother geekbrother merged commit 3b10917 into main Oct 2, 2023
@chris13524 chris13524 deleted the max/chore/make_prod_optional branch October 2, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The issue has been accepted into the project area-github GitHub Actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: extract deploying to staging in cd workflow
3 participants