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

PLANET-5443 Add rollback target to Makefile #53

Merged
merged 1 commit into from Sep 11, 2020
Merged

PLANET-5443 Add rollback target to Makefile #53

merged 1 commit into from Sep 11, 2020

Conversation

comzeradd
Copy link
Member

Split deploy target into three (prepare, deploy, post), so these can be re-used for rollback.

Rollback also checkouts code in order to run post-deploy scripts.

Split deploy target into three (prepare, deploy, post), so these can
be re-used for rollback.

Rollback also checkouts code in order to run post-deploy scripts
@comzeradd comzeradd changed the title Add rollback target to Makefile PLANET-5443 Add rollback target to Makefile Sep 10, 2020
@comzeradd comzeradd marked this pull request as ready for review September 10, 2020 11:45
Copy link
Member

@lithrel lithrel left a comment

Choose a reason for hiding this comment

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

👍
Funny that prepare-helm target does not include ./helm_prepare.sh script, but I don't have a better name to propose for the target 🤷‍♂️

Copy link
Contributor

@Inwerpsel Inwerpsel left a comment

Choose a reason for hiding this comment

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

Looks good 👍 Left a suggestion to have separate job steps with the new make targets but that would be for other repo's, maybe we could include it in https://github.com/greenpeace/planet4-nro-generator/pull/31/files

# Rollback to the previous good release
./helm_rollback.sh

deploy-helm:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Now that this is a separate target, maybe we could make prepare-helm deploy-helm post-deploy into separate job steps instead of a single one with the deploy target. Would make the job output easier to navigate.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can take that as a separate task, since this would require further changes at the CI templates, but it's a good point. We can break this up even further and also start using name: at our CI steps to make them less cryptic.

@@ -270,6 +268,11 @@ endif
--zone $(GCLOUD_ZONE) \
--project $(GOOGLE_PROJECT_ID)

rollback-helm:
# Rollback to the previous good release
Copy link
Contributor

Choose a reason for hiding this comment

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

Should work for staging as the previous one should be the one that's on production 👍 Is there a way to find out exactly which version is on production so we can pass it explicitly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Helm will look specifically for the staging images, because it uses HELM_RELEASE from the env variables.

@comzeradd comzeradd merged commit 1c6b757 into develop Sep 11, 2020
@comzeradd comzeradd deleted the rollback branch September 11, 2020 06:22
greenpeace-circleci pushed a commit that referenced this pull request Sep 11, 2020
 - Merge pull request #53 from greenpeace/rollback

PLANET-5443 Add rollback target to Makefile

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants