-
- 1.1. Branching Strategy
- 1.2. Flow Steps
- 1.3. Environments
- 1.3.1. Development Environment
- 1.3.2. Test Environment
- 1.3.3. UAT Environment
- 1.3.4. Production Environment
In Git Flow, a well-defined branching strategy helps manage the development process efficiently. The key branches in Git Flow are:
- Main Branch: Represents the latest code.
- Feature Branches: Created for developing new features.
- Release Branches: Used to prepare for a new release.
- Hotfix Branches: Created to fix critical issues in the released code.
sequenceDiagram
autonumber
participant F as FeatureBranches
participant M as MainBranch
participant H as HotfixBranches
participant R as ReleaseBranches
loop
M->>F: feature/1234-TaskDescription where 1234 is DevOps WorkItem nr
F-->>F: Commit format: #35;1234-TaskDescription
F-->>F: Push to remote
F->>M: Pull Request to Main
M->>F: if not successful -> Fix issues and repeat steps 3-4
F->>M: if PR Build and Approval successful -> Merge to Main
loop
M->>M: Automatic CI/CD to UAT Environment
M->>M: Test in UAT Environment
M->>F: if Tests not successful -> Fix issues and repeat steps 3-4
M->>R: if successful -> Create Release including its Branch and Increasing Version
end
end
loop
activate F
R-xF: After Publishing to AppSource Delete Feature Branch
deactivate F
Note left of R: Bug Discovered!
R->>H: if Bug Discovery -> Create Hotfix Branch
H->>H: Fix Bug
H->>R: Create PR:Merge to that ReleaseBranch
H->>M: Create PR:Merge to Main
end
-
Create Feature Branch:
- Create a feature branch from
main
where all development takes place.
- Create a feature branch from
-
Deploy to Test Environment:
- Deploy the
.app
from the feature branch to the Test Environment for development testing.
- Deploy the
-
Pull Request to Main:
- Create a pull request from the feature branch to
main
.
- Create a pull request from the feature branch to
-
Pull Request Build and Approval:
-
Trigger a build for the pull request.
-
Seek necessary approvals.
-
If approved, proceed to step 5.
-
If not approved, go back to the feature branch, fix issues, and repeat steps 3-4.
-
-
Merge to Main:
- Merge the feature branch into
main
.
- Merge the feature branch into
-
CI/CD to UAT Environment:
- Set up Continuous Integration/Continuous Deployment (CI/CD) from
main
to deploy to the UAT Environment.
- Set up Continuous Integration/Continuous Deployment (CI/CD) from
-
Test in UAT:
-
Perform testing in the UAT Environment.
-
If testing is successful, proceed to step 8.
-
If issues are found, go back to the feature branch, fix, and repeat steps 3-6.
-
-
Create Release Branch:
- Create a release branch from
main
. - Increase the version for the release.
- Create a release branch from
-
Publish to AppSource:
- Publish the release to AppSource.
-
Delete Feature Branch:
- Once the feature is successfully merged and released, delete the feature branch.
-
Bug Discovery:
- If a bug is discovered, create a hotfix branch from
main
.
- If a bug is discovered, create a hotfix branch from
Feel free to customize the text or add any specific details as needed for your workflow.