Note: This page is still a work in progress and may contain incomplete or inaccurate data.
-
"Feature Branch" -- Any branch used to track distinct work related to a particular Azure DevOps ticket that has been reviewed by the team. This might include
bug.123.release,story.123.release, ortask.123.releasebranches. -
"Merging" -- All references to merging X branch into Y branch refers to creating a Pull Request in Azure DevOps.
-
scotch-env-- This is the team development environment. Manual QA testing is done in this environment. -
staging.candidate-- Staging branch where all tickets going to prod that have passed QA live. Automated and Manual Regression is done on this branch -
release.candidate-- Release branch where all tickets that passed regression live. This branch will be merged withmainduring the releases -
main-- Production
-
More Info | Workflow Example: Ideal Workflow
- Feature branches should ALWAYS be based on either the
mainbranch or another feature branch.
- Feature branches should ALWAYS be based on either the
-
More Info | Workflow Example: Ideal Workflow
- The
scotch-envbranch should only ever have feature branches merged into it. - The
staging.candidatebranch should only ever have feature branches merged into it. - The
release.candidatebranch should only ever have thestaging.candidatebranch merged into it - The
mainbranch should only ever have therelease.candidatebranch merged into it.
- The
New feature branches should always be based on either the main branch or another feature branch. This is to ensure that the branch can distinctly be merged into the scotch-env and release.candidate branches without any need for cherry picking.
graph LR
subgraph "Core"
scotch-env(fa:fa-code-branch scotch-env)
main(fa:fa-code-branch main)
staging.candidate(fa:fa-code-branch staging.candidate)
end
subgraph "Feature"
TASK[fa:fa-code-branch task.1]
TASK2[fa:fa-code-branch task.2]
TASK3[fa:fa-code-branch task.3]
end
main -.- TASK -.- TASK3
main -.- TASK2
When propagating the changes made in a feature branch, the branch should be merged separately to both the scotch-env branch and the release.candidate branch.
- If the intention is to deploy it to
scotch-envfor basic testing, the feature branch can be merged / deployed to thescotch-envbranch at any time. - When features in
scotch-envpasses QA, they can be merged intostaging.candidate - When all features in
staging.candidatepass regression, the branch can be merged intorelease.candidate
graph LR
subgraph "Feature"
FEAT[fa:fa-code-branch story.123]
end
subgraph "Core"
SCOTCH(fa:fa-code-branch scotch-env)
STAGING(fa:fa-code-branch staging.candidate)
RELEASE(fa:fa-code-branch release.candidate)
main(fa:fa-code-branch main)
end
FEAT --> SCOTCH & STAGING
STAGING --> RELEASE --> main
After a release, the scotch-env will need to be re-synced with the main branch. We can do this by back porting main into scotch-env after each release with a pull request
graph LR
SCOTCH(fa:fa-code-branch scotch-env)
main(fa:fa-code-branch main)
SCOTCH --> main
In this example:
task.123is created from themainbranch.task.123has changes added to it.- PR is made for
task.123intoscotch-envfor team to code review. task.123is merged toscotch-envfor dev and manual qa testing.- Once
task.123has passed manual QA testing, PR is made fortask.123intostaging.candidate. - Once regression passes on
staging.candidatethe branch is merged torelease.candidate.- Note: This step is not performed by the engineer
release.candidateis merged intomainduring the release process.- Note: This step is not performed by the engineer
- The day after a release,
mainis back ported toscotch-env.
gitGraph
commit id:"..."
branch release.candidate
branch staging.candidate
branch scotch-env
checkout main
commit id:" "
checkout main
branch task.123
commit id:"commit 1"
commit id:"commit 2"
checkout scotch-env
merge task.123
commit id:"QA Passes" type: HIGHLIGHT
checkout staging.candidate
merge task.123
commit id:"Regression Passes" type: HIGHLIGHT
checkout release.candidate
merge staging.candidate
commit id:"Release to Prod" type: HIGHLIGHT
checkout main
merge release.candidate
commit id:"Backport"
checkout scotch-env
merge main
In this example:
task.123is created from themainbranch.task.123has changes added to it.- PR is made for
task.123intoscotch-envfor team to code review. task.123is merged toscotch-envfor dev and manual qa testing.task.123fails QA.task.123is reverted fromscotch-envvia the PR made in step 4.- The fix is implemented in the
task.123branch. - PR is made for
task.123intoscotch-envfor team to code review the fix. - Once
task.123has passed manual QA testing, PR is made fortask.123intostaging.candidate. - Once regression passes on
staging.candidatethe branch is merged torelease.candidate.- Note: This step is not performed by the engineer
release.candidateis merged intomainduring the release process.- Note: This step is not performed by the engineer
- The day after a release,
mainis back ported toscotch-env.
gitGraph
commit id:"..."
branch release.candidate
branch staging.candidate
branch scotch-env
checkout main
commit id:" "
checkout main
branch task.123
commit id:"commit 1"
commit id:"commit 2"
checkout scotch-env
merge task.123
commit id:"Revert task.123 fails QA" type: REVERSE
checkout task.123
commit id:"Patch QA Issue"
checkout scotch-env
merge task.123
commit id:"QA Passes" type: HIGHLIGHT
checkout staging.candidate
merge task.123
commit id:"Regression Passes" type: HIGHLIGHT
checkout release.candidate
merge staging.candidate
commit id:"Release to Prod" type: HIGHLIGHT
checkout main
merge release.candidate
commit id:"Backport"
checkout scotch-env
merge main
This workflow will cover how to handle stories that rely on each other.
In this example we have task 1 and task 2. Lets say task 1 is to create a new settings page and task 2 is to add a form to that new settings page.
task.1is created from themainbranch.task.1has changes added to it- PR is made for
task.1intoscotch-envfor team to code review task.1is merged toscotch-envfor dev and manual qa testing.- Once
task.1has passed manual QA testing, PR is made fortask.1intostaging.candidate. task.2is made off of thetask.1branchtask.2has changes added to it- PR is made for
task.2intoscotch-envfor team to code review task.2is merged toscotch-envfor dev and manual qa testing.- Once
task.2has passed manual QA testing, PR is made fortask.2intostaging.candidate. - Once regression passes on
staging.candidatethe branch is merged torelease.candidate.- Note: This step is not performed by the engineer
release.candidateis merged intomainduring the release process.- Note: This step is not performed by the engineer
- The day after a release,
mainis back ported toscotch-env.
gitGraph
commit id:"..."
branch release.candidate
branch staging.candidate
branch scotch-env
checkout main
commit id:" "
checkout main
branch task.1
commit id:"commit 1.1"
commit id:"commit 1.2"
checkout scotch-env
merge task.1
commit id:"Task 1 Passes QA" type: HIGHLIGHT
checkout staging.candidate
merge task.1
checkout task.1
branch task.2
commit id:"commit 2.1"
commit id:"commit 2.2"
checkout scotch-env
merge task.2
commit id:"Task 2 Passes QA" type: HIGHLIGHT
checkout staging.candidate
merge task.2
commit id:"Regression Passes" type: HIGHLIGHT
checkout release.candidate
merge staging.candidate
commit id:"Release to Prod" type: HIGHLIGHT
checkout main
merge release.candidate
commit id:"Backport"
checkout scotch-env
merge main