generator-ccc icon indicating copy to clipboard operation
generator-ccc copied to clipboard

Enable rollback option

Open trevoryager-callaway opened this issue 3 years ago • 0 comments

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.

trevoryager-callaway avatar Sep 16 '21 17:09 trevoryager-callaway