SlideShare a Scribd company logo
1 of 10
GIT - gitflow
R&D
GITFLOW
2
❑ Requirements :
● We want a stable (main) branch that is indisputable without having to search for the
latest tag to avoid (human) error
● We want an integration/pre-production branch that will serve as an intermediate
branch to help stabilize developments without impacting the stable branch.
● We want a development branch which will by definition be the unstable branch (which
is completely normal) in which all the branches will be merged after a Merge request.
● Merge requests allow code review and thus participate in the cross-functional sharing of
development knowledge within the team.
3
■ Thus, all git repo MUST have three default branches :
 main : the stable branch similar to the production
 integration : the branch used for intermediate integration is the equivalent of a
preproduction
 development : the unstable branch used to merge the developments to be integrated
GITFLOW
GITFLOW
4
❑ Thus, the official GITFLOW to be use is the following one :
main/stable/production
preprod/integration
Development/unstable
HOTFIX / ID-JIRA / DESCRIPTION
BUGFIX / ID-JIRA / DESCRIPTION
FEATURE / ID-JIRA / DESCRIPTION
TAG1 TAG2
rebase
rebase
rebase
Merge
request
Merge
request
Merge
request
Merge
request
MR
Merge
request
Push
+
merge
request
Push
+
merge
request
Push
+
merge
request
5
GITFLOW
Main
(stable’s branch)
Integration’s branch
Develop
(unstable’s branch)
HOTFIX
branch
branch
branch
Push on
the bugfix
branch
BUGFIX
FEATURE
Rebase
branch
branch
Rebase
Push + Merge
Request
Push + Merge
Request
All branches merged into this
integration branch should reflect
what will be described in the final
release note.
RC
9.1.0
RC
9.1.1
HOTFIX
branch
Merge
Request
Merge
Request
Merge
Request
Merge
Request
9.0.0 9.1.1
Merge
Request
Push on
the bugfix
branch
Merge
Request
Merge
Request
CI : linters (gitlab)
Hotfix
release
Official
release
Hotfix
release
If the
hotfix is
clean!
If the
hotfix is
clean!
Jenkins nightly build +
sanity tests
Jenkins build +
focus test on
the hotfix
Jenkins build +
focus test on
the hotfix
Jenkins build + complete tests
Jenkins nightly build +
sanity tests
6
GITFLOW
main
integration
develop
hotfix
bugfix
feature
Push
Merge
request
Create
branch
Create
branch
Create
branch
Create
branch
Create
branch
Rebase
Hotfix
release
Jenkins build +
focus test on
the hotfix
Jenkins nightly
build + sanity
tests
Push
Merge
request
Rebase
Jenkins nightly
build + sanity
tests
CI : linters (gitlab)
Merge
request
Merge
request
Jenkins build + complete tests
9.0.0 9.1.1
Official
release
Merge
request
GITFLOW
7
❑ 1. Direct push on the develop/maintenance/main branches are forbidden to guarantee the smooth running of the
workflow.
❑ 2. A push to origin (gitlab) on a well-named branch (using correct patterns) is allowed. The push in its feature branch
must be able to trigger the gitlab CI like the linters (cppcheck, sonarcube, pylint, dockerlint, .... ) and thus create a
verification at the source and send an email to the author and forbid him to go further until this step is safe.
❑ 3. A merge request (aka MR) must be done manually by the developer of his branch from the gitlab UI by specifying
one or more people for a code review. At least one person must approve the code for it to be validated and to be able
to validate the merge to the develop branch. Once merged, the branch can be destroyed automatically.
❑ 4. If it is not approved, it is possible to modify its code and go back to step 2 while keeping the MR open. If validated,
this step allows other developers to get the functionality.
❑ 5. When preparing a release, a new merge request (without code review) is made by the release builder. Merge
request and validation in stride should allow to have a precise visibility of what will be validated and also to be able to
have an idea of the final changelog.
❑ 6. Before launching a validation, a tag is placed because it will identify the Release candidate (aka RC) in the making.
Even if they can be launched on the develop branch, it is at this stage that the complete auto tests can be launched in
order to validate the version (in addition to the manual tests). This step is iterated until it is stable for a client
delivery.
❑ 7. Once stable and validated, a last MR is done manually because the content of the integration branch which
corresponds to the last validated RC becomes the new stable branch.
GITFLOW
8
❑ Some gitlab settings to affect to all git repos :
● Configure your repos to prohibit any direct git push without going through a branch and a merge request :
https://docs.gitlab.com/ee/user/project/protected_branches.html
● Branches must have a correct pattern :
▶ hotfix/ID-JIRA/description : must be created from the master/stable’s branch and forward to the preprod then develop ; it must be used to
fix a major and urgent bug in production
▶ bugfix/ID-JIRA/description : must be created from the develop’s branch then merge to preprod, finaly to master ; it must be used to fix a
minor bug
▶ feature/ID-JIRA/description : must be created from the develop’s branch then merge to preprod, finaly to master ; it must be used to
develop a new feature
▶ All branch name mus be in lower case !
● Those pattern can be forced in GITLAB using a regexp :
https://docs.gitlab.com/ee/user/project/repository/push_rules.html
The ID-JIRA is important if gitlab is linked with JIRA
● Link gitlab with jira in order to add traceability and synchronization of commits :
https://about.gitlab.com/blog/2021/04/12/gitlab-jira-integration-selfmanaged/
❑ The modification of the git flow may give rise to a tiny modification
of:
o jenkins for the generation of releases.
o the git repo cache configuration from git(lab)
❑ Survey available on the drive :
https://docs.google.com/presentation/d/1nK76saocbz2mVaEurreW63q-
4WfHhFkF/edit?usp=share_link&ouid=113587050683981420435&rtpof=
true&sd=true
GITFLOW
9
ENENSYS
4A rue des Buttes
CS 37734
35 577 Cesson-Sévigné – France
Phone (+33) 1 70 72 51 70
Email contact@test-tree.com
www.enensys.com
10

More Related Content

Similar to GITFlow definition for all software projects

Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)GDSCNiT
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesAbhinav Gupta
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
Git basics a starter on git and its ecosystem
Git basics  a starter on git and its ecosystemGit basics  a starter on git and its ecosystem
Git basics a starter on git and its ecosystemFrançois D'Agostini
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow IntroductionDavid Paluy
 
Source code management with Git
Source code management with GitSource code management with Git
Source code management with GitRadu Barbu
 
Overview of Gitlab usage
Overview of Gitlab usageOverview of Gitlab usage
Overview of Gitlab usageOluDouglas
 
BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)Drupal Portugal
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flowKnoldus Inc.
 
Git - Simplified For Testers
Git - Simplified For TestersGit - Simplified For Testers
Git - Simplified For Testersupadhyay_25
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for BeginnersNebulaworks
 
Understanding GitFlow by Ian Vizarra
Understanding GitFlow by Ian VizarraUnderstanding GitFlow by Ian Vizarra
Understanding GitFlow by Ian Vizarravzrx23
 
GitFlow Workshop
GitFlow WorkshopGitFlow Workshop
GitFlow WorkshopSyed Imam
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentLemi Orhan Ergin
 
01 git interview questions & answers
01   git interview questions & answers01   git interview questions & answers
01 git interview questions & answersDeepQuest Software
 
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTreeManaging software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTreeBosnia Agile
 
Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptxtapanvyas11
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanJames Ford
 

Similar to GITFlow definition for all software projects (20)

Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Git basics a starter on git and its ecosystem
Git basics  a starter on git and its ecosystemGit basics  a starter on git and its ecosystem
Git basics a starter on git and its ecosystem
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Source code management with Git
Source code management with GitSource code management with Git
Source code management with Git
 
Overview of Gitlab usage
Overview of Gitlab usageOverview of Gitlab usage
Overview of Gitlab usage
 
BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flow
 
Git - Simplified For Testers
Git - Simplified For TestersGit - Simplified For Testers
Git - Simplified For Testers
 
Web-development-git
Web-development-gitWeb-development-git
Web-development-git
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for Beginners
 
Understanding GitFlow by Ian Vizarra
Understanding GitFlow by Ian VizarraUnderstanding GitFlow by Ian Vizarra
Understanding GitFlow by Ian Vizarra
 
GitFlow Workshop
GitFlow WorkshopGitFlow Workshop
GitFlow Workshop
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software Development
 
Git Best Practices.pptx
Git Best Practices.pptxGit Best Practices.pptx
Git Best Practices.pptx
 
01 git interview questions & answers
01   git interview questions & answers01   git interview questions & answers
01 git interview questions & answers
 
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTreeManaging software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
 
Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptx
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 

Recently uploaded

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

GITFlow definition for all software projects

  • 2. GITFLOW 2 ❑ Requirements : ● We want a stable (main) branch that is indisputable without having to search for the latest tag to avoid (human) error ● We want an integration/pre-production branch that will serve as an intermediate branch to help stabilize developments without impacting the stable branch. ● We want a development branch which will by definition be the unstable branch (which is completely normal) in which all the branches will be merged after a Merge request. ● Merge requests allow code review and thus participate in the cross-functional sharing of development knowledge within the team.
  • 3. 3 ■ Thus, all git repo MUST have three default branches :  main : the stable branch similar to the production  integration : the branch used for intermediate integration is the equivalent of a preproduction  development : the unstable branch used to merge the developments to be integrated GITFLOW
  • 4. GITFLOW 4 ❑ Thus, the official GITFLOW to be use is the following one : main/stable/production preprod/integration Development/unstable HOTFIX / ID-JIRA / DESCRIPTION BUGFIX / ID-JIRA / DESCRIPTION FEATURE / ID-JIRA / DESCRIPTION TAG1 TAG2 rebase rebase rebase Merge request Merge request Merge request Merge request MR Merge request Push + merge request Push + merge request Push + merge request
  • 5. 5 GITFLOW Main (stable’s branch) Integration’s branch Develop (unstable’s branch) HOTFIX branch branch branch Push on the bugfix branch BUGFIX FEATURE Rebase branch branch Rebase Push + Merge Request Push + Merge Request All branches merged into this integration branch should reflect what will be described in the final release note. RC 9.1.0 RC 9.1.1 HOTFIX branch Merge Request Merge Request Merge Request Merge Request 9.0.0 9.1.1 Merge Request Push on the bugfix branch Merge Request Merge Request CI : linters (gitlab) Hotfix release Official release Hotfix release If the hotfix is clean! If the hotfix is clean! Jenkins nightly build + sanity tests Jenkins build + focus test on the hotfix Jenkins build + focus test on the hotfix Jenkins build + complete tests Jenkins nightly build + sanity tests
  • 6. 6 GITFLOW main integration develop hotfix bugfix feature Push Merge request Create branch Create branch Create branch Create branch Create branch Rebase Hotfix release Jenkins build + focus test on the hotfix Jenkins nightly build + sanity tests Push Merge request Rebase Jenkins nightly build + sanity tests CI : linters (gitlab) Merge request Merge request Jenkins build + complete tests 9.0.0 9.1.1 Official release Merge request
  • 7. GITFLOW 7 ❑ 1. Direct push on the develop/maintenance/main branches are forbidden to guarantee the smooth running of the workflow. ❑ 2. A push to origin (gitlab) on a well-named branch (using correct patterns) is allowed. The push in its feature branch must be able to trigger the gitlab CI like the linters (cppcheck, sonarcube, pylint, dockerlint, .... ) and thus create a verification at the source and send an email to the author and forbid him to go further until this step is safe. ❑ 3. A merge request (aka MR) must be done manually by the developer of his branch from the gitlab UI by specifying one or more people for a code review. At least one person must approve the code for it to be validated and to be able to validate the merge to the develop branch. Once merged, the branch can be destroyed automatically. ❑ 4. If it is not approved, it is possible to modify its code and go back to step 2 while keeping the MR open. If validated, this step allows other developers to get the functionality. ❑ 5. When preparing a release, a new merge request (without code review) is made by the release builder. Merge request and validation in stride should allow to have a precise visibility of what will be validated and also to be able to have an idea of the final changelog. ❑ 6. Before launching a validation, a tag is placed because it will identify the Release candidate (aka RC) in the making. Even if they can be launched on the develop branch, it is at this stage that the complete auto tests can be launched in order to validate the version (in addition to the manual tests). This step is iterated until it is stable for a client delivery. ❑ 7. Once stable and validated, a last MR is done manually because the content of the integration branch which corresponds to the last validated RC becomes the new stable branch.
  • 8. GITFLOW 8 ❑ Some gitlab settings to affect to all git repos : ● Configure your repos to prohibit any direct git push without going through a branch and a merge request : https://docs.gitlab.com/ee/user/project/protected_branches.html ● Branches must have a correct pattern : ▶ hotfix/ID-JIRA/description : must be created from the master/stable’s branch and forward to the preprod then develop ; it must be used to fix a major and urgent bug in production ▶ bugfix/ID-JIRA/description : must be created from the develop’s branch then merge to preprod, finaly to master ; it must be used to fix a minor bug ▶ feature/ID-JIRA/description : must be created from the develop’s branch then merge to preprod, finaly to master ; it must be used to develop a new feature ▶ All branch name mus be in lower case ! ● Those pattern can be forced in GITLAB using a regexp : https://docs.gitlab.com/ee/user/project/repository/push_rules.html The ID-JIRA is important if gitlab is linked with JIRA ● Link gitlab with jira in order to add traceability and synchronization of commits : https://about.gitlab.com/blog/2021/04/12/gitlab-jira-integration-selfmanaged/
  • 9. ❑ The modification of the git flow may give rise to a tiny modification of: o jenkins for the generation of releases. o the git repo cache configuration from git(lab) ❑ Survey available on the drive : https://docs.google.com/presentation/d/1nK76saocbz2mVaEurreW63q- 4WfHhFkF/edit?usp=share_link&ouid=113587050683981420435&rtpof= true&sd=true GITFLOW 9
  • 10. ENENSYS 4A rue des Buttes CS 37734 35 577 Cesson-Sévigné – France Phone (+33) 1 70 72 51 70 Email contact@test-tree.com www.enensys.com 10