Branching Strategy - Enterprise-CMCS/macpro-mako GitHub Wiki

MACPRO-Single-Branch-Strategy-Val-Prod drawio

Developing a Feature

  1. Create a feature branch off of the main branch and push it to GitHub. This will trigger the creation of a feature environment to be used for development and testing.
  2. Create a PR from the feature branch to the main branch.
  3. Development is completed.
  4. Another Dev reviews the PR.
  5. QA confirms that the feature is working as expected in the feature environment.
  6. CMS approves the feature demoed from the feature environment.
  7. Squash and merge the feature branch into the main branch. This will trigger a deployment to the VAL environment. It will also delete the feature branch and clean up the feature environment.
  8. QA Confirms that the feature is working as expected in the VAL environment.

Creating a Release

  1. Confirm that all of the work needed for the release is in the main branch.
  2. Create a release tag that follows the semver minor release standard format. Click the “Generate release notes” button to create release notes. Click the “Publish release” button to create the tag and trigger a deployment to the PROD environment.
  3. QA confirms that the features are working as expected in the PROD environment.
  4. CMS confirms acceptance of features in the PROD environment.

Performing a Hotfix

  1. Find the commit ID of the latest release using the command below, where <vX.X.X> is replaced with the latest release tag. git rev-list -n 1 <vX.X.X>
  2. Create a hotfix branch from the commit ID using the command below, where <vX.X.X> is replaced with the release tag and <commit-id> is replaced with the commit ID from above. git branch release-<vX.X.X> <commit-id>
  3. Push the hotfix branch to GitHub which triggers the creation of a hotfix environment.
  4. Create a PR from the hotfix branch to the main branch.
  5. Fixes are completed.
  6. Another Dev reviews the PR.
  7. QA confirms that the fixes are working as expected in the hotfix environment.
  8. CMS approves the fixes in the hotfix environment.
  9. Create a release tag that follows the semver patch release format. Update “Target” to point to the hotfix branch. Click the “Generate release notes” button to create release notes for the tag. Click the “Publish release” button which will trigger a deployment to the PROD environment.
  10. QA confirms that the fixes are working as expected in the PROD environment.
  11. CMS confirms acceptance of the fixes in the PROD environment.
  12. Squash and merge the hotfix branch into the main branch which will trigger a deployment to the VAL environment.
  13. QA Confirms that the feature is working as expected in the VAL environment.
⚠️ **GitHub.com Fallback** ⚠️