release-me - Git Ops Process
This document describes our definition of the release-me Git Ops Process.
release-me process ships changes in the
headbranch into Production.
It is designed to suit starting state as below
%%{init: { 'logLevel': 'debug', 'gitGraph': {'showBranches': true,
'rotateCommitLabel': true,
'showCommitLabel':true,'mainBranchName': 'main'}} }%%
gitGraph
commit id: "[NEW] 1.1.0" type: HIGHLIGHT tag: "v1.1.0"
commit id: "[FIX] 1.1.1" type: HIGHLIGHT tag: "v1.1.1"
commit id: "[DEV] 1.1.2-dev" type: HIGHLIGHT tag: "v1.1.2-dev"
commit id: "[NEW] 1.2.0" type: HIGHLIGHT tag: "v1.2.0"
commit id: "[NEW] 2.0.0" type: HIGHLIGHT tag: "v2.0.0"
branch release
branch "User Br"
commit
commit id: "new feat"
Phases - Git Flow
The release-me process is implemented in 2 Phases.
Developer fires 2 git tag events, one per Phase, to start it, on-demand.
graph LR;
A[User Branch]
A --PR --> B[Release]
B--PR --> C[Main]
Phase 1-> Push therelease-megit tag to remote
Phase 2-> Push aauto-prod-<sem_ver>git tag to remote
A typical Release User Journey for a single-Developer/Contributor project, might look like
journey
title Release branch to Prod
section Open PR to main
Run release-me Phase 1: 9: Dev
Wait for QA: 7: Dev
section Merge PR to main
Sync local release branch to remote: 6: Dev
Commit Changelog update on release: 4: Dev
Commit Sem Ver Bump in sources: 5: Dev
Run release-me Phase 2: 8: Dev
Wait for QA: 8: Dev
Phase 1
- On-demand trigger by pushing the
release-megit tag to remote.
In this phase we say
**Our `head` branch has all the code changes to be released**
export tt='release-me'
git tag -d "$tt"; git push --delete origin "$tt"
git tag "$tt" && git push origin "$tt"
- Opens a
PR'User Br' --> 'release', and auto merges if PR OK - Opens a
PR'release' --> 'main'
%%{init: { 'logLevel': 'debug', 'theme': 'gitGraph': {'rotateCommitLabel': true, 'showBranches': true, 'showCommitLabel':true, 'mainBranchName': 'main / master'}} }%%
gitGraph
commit id: "[NEW] 1.1.0" type: HIGHLIGHT tag: "v1.1.0"
commit id: "[FIX] 1.1.1" type: HIGHLIGHT tag: "v1.1.1"
commit id: "[DEV] 1.1.2-dev" type: HIGHLIGHT tag: "v1.1.2-dev"
commit id: "[NEW] 1.2.0" type: HIGHLIGHT tag: "v1.2.0"
commit id: "[NEW] 2.0.0" type: HIGHLIGHT tag: "v2.0.0"
branch release
branch "User Br"
commit
commit id: "new feat"
checkout release
merge "User Br" id: "Merge" type: HIGHLIGHT
Manual Phase
Typically, the Developer should take care of doing the necessary Release chores, which include make changes to the source files.
- Adding a new Release Entry in source Changelog
Phase 2
- On-demand trigger by pushing a
auto-prod-<sem_ver>git tag to remote.
Tip
Typically, the Developer should take care of doing the necessary Release chores, which include make changes to the source files, on the release branch:
- Updating Changelog, by adding a Release Entry corresponding to the new Sem Ver
- Updating Sem Ver in Sources, by bumping all references of Version maintained in the Sources
Example:
export tt='auto-prod-2.1.0'
git tag -d "$tt"; git push --delete origin "$tt"
git tag "$tt" && git push origin "$tt"
- Auto Merge
PR'release' --> 'main', and merge if PR OK
%%{init: { 'logLevel': 'debug', 'theme': 'gitGraph': {'rotateCommitLabel': false, 'showBranches': true, 'showCommitLabel':true, 'mainBranchName': 'main / master'}} }%%
gitGraph
commit id: "[NEW] 1.1.0" type: HIGHLIGHT tag: "v1.1.0"
commit id: "[FIX] 1.1.1" type: HIGHLIGHT tag: "v1.1.1"
commit id: "[DEV] 1.1.2-dev" type: HIGHLIGHT tag: "v1.1.2-dev"
commit id: "[NEW] 1.2.0" type: HIGHLIGHT tag: "v1.2.0"
commit id: "[NEW] 2.0.0" type: HIGHLIGHT tag: "v2.0.0"
branch release
branch "User Br"
commit
commit id: "new feat"
checkout release
merge "User Br" id: "Merge" type: HIGHLIGHT
checkout main
merge release id: "[NEW] 2.1.0" type: HIGHLIGHT tag: "v2.1.0"