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

Enable rollback option #57

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

trevoryager-callaway
Copy link
Contributor

Pay attention to this code review as it would tweak the process and this needs to be discussed.

Changes summary

bitbucket-pipelines.yml

  • New custom pipeline for Rollbacks
  • For pull requests, perform specific actions if they start with rollback/

package.sh

  • Always creates a backup of what is already in prod

merge.sh

  • All merges are now a merge and squash.
  • We use the Bitbucket API to perform the merge and squash so it closes the pull request.
    • Reference note in this file for more info

prepareRollbackBranch.sh

  • Creates a new pull request with the revert of a provided commit hash

Overview:

Going forward, when we deploy a pull request it will perform a merge and squash.
This will make it easier to do a revert in the future.

There is a new custom pipeline that allows for us to specify the commit hash we want reverted.
The custom pipeline will run and create a new pull request that is a revert of the provided hash.

All pull requests that start with rollback/ will automatically build the package and validate the package.
The only thing the user will need to do is click "Deploy Rollback".

Process change

Because we are making Bitbucket API calls, there is a need for workspace variables

  1. BITBUCKET_USERNAME
  2. BITBUCKET_APP_PASSWORD

The app password needs to include the ability to write pull requests.
The above two variables are technically already in the bitbucket pipeline yaml file (reference $tests).
We would need to update the documentation on the pipeline b/c the above to variables are not documented there to begin with.

… the pull request will remain open in the Bitbucket UI. That is why I switched to having Bitbucket merge and squash the pull request via the Bitbucket API
… the revert of a specified hash. It then uses the Bitbucket API to create a pull request that should then trigger a pipeline for it.
…e for rollbacks. Added a new pipeline for pull requests that start with rollback/ . We want to automatically build and check rollback packages when a rollback pull request is created.
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.

1 participant