GIT Branching Strategy and Release Flow
Contents
Development Workflow
- Developer clones repository and checks out develop branch
|
- Developer creates a new dedicated feature branch off develop in their local repo. Optionally, the name of the branch can include developer initials indicating who owns the branch
|
- Developer commits to create the feature. Developer can use interactive rebase to remove or squash unnecessary commits.
- Developer makes sure that Jira ticket number is included as part of commit comments for every commit made.
|
- Developer pushes the feature branch to the shared TeachingStrategies Bitbucket repository.
|
- Developer files a pull request via Bitbucket
- Developer can create the pull request through their Bitbucket account by navigating to their forked repository and clicking the Pull request button in the top-right corner. The resulting form automatically sets developer’s repository as the source repository, and it asks them to specify the source branch, the destination repository, and the destination branch
- The rest of the team reviews the code, discusses it, and alters it
- The pull request initiator rebases the code based on develop after the code review is complete and resolves conflicts before starting the merge process into int-develop and later develop branch
- Any conflict resolution added should also be reviewed within the pull request before merging the branch into int-dev branch
- After validation, developer marks the commit as “Ready for develop”
- Developer merges the feature into the develop branch
Release Workflow
- At the start of every sprint, Dev creates feature branch as described in development workflow
- Developer sets the Jira ticket from “In Requirements” to “In Dev” and starts development.
- After feature is complete, Developer deploys the feature branch to local environment
- Developer runs manual validation tests to conform requirements
- Developer tags the commit as “Ready for Develop”
INT-DEV
- Developer creates a Pull Request using “Ready for Develop” commit and goes through Code Review process
- Developer merges Feature branch into 'Integration Develop (int-dev)' branch
- Manual CI build deploys latest INT-DEV changes to DEV environment
- Developer performs manual testing on int-dev branch
DEV
- Developer sets the Jira ticket to “In Review”
- Developer creates Pull Request and goes through Code Review process
- Developer merges Feature branch into 'Develop'
- Automatic build gets triggered and deploys to 'DEV' environment
- Automated tests runs on DEV environment.
- Developer marks work item in JIRA as 'Ready for QA'
- Developer/Qa team (manual or automated) tags commit-id with QA tag
QA
- Developer/Qa team creates 'QA' tag for all work items which QA ready
- Developer/Qa team triggers 'QA' builds in Jenkins using 'QA' tag and commit-id that was tested in DEV
- Qa team performs 'QA' testing and marks it as 'QA DONE' in JIRA
- Developer deletes local and remote feature branch for the specific feature
INT
- Developer/Qa team merges 'QA' tagged commits from 'develop' to 'release/v1.0' branch
- Developer/Qa team creates 'INT' tag on the release/v1.0 branch
- Developer/Qa team triggers 'INT' build using the 'INT' tagged commit
- Business Users/Performance Testers perform UAT/Performance testing on 'INT' environment
- All UAT issues are reported through a new JIRA defect
PROD
- Developer/Qa team creates 'PROD' tag on 'INT' passed commits
- Developer/Qa team triggers production release pipelines (gated approvals) using the change management approval process.
- Once production deployment is complete, Dev/Qa team will merge the 'release/v1.0' branch to 'master' and tag it
HotFix
- The “hotfix” branches will be used to quickly patch production releases. Hot-fixes branches will be created from the 'master' branch using the release tag. This is the only branch that should fork off master.
- Once the fix is ready, it will be tested on “integration” or closest production like environment and deployed to Production using standard INT->PRD workflow.
- Once the fix is complete, it should be merged back to master and any applicable downstream branches like ‘develop’. The commit should also be tagged in master branch.
Deployment Day
- Release-x is deployed to production and merged into Master