Introduction
First of all, this documentation is a summary of https://docs.gitlab.com/ee/topics/gitlab_flow.html
Structure
With this flow we use only master
, feature
, fix
and release
branches and totally remove develop
branch unlike in gitflow
How to add feature or fix
In this flow, all feature or fix branches must be based on master
branch and merged after review on master
branch
How to add hotfix
We have to identify the type of hotfix:
- hotfix for both current version and released versions
- hotfix for specific release
Hotfix for all versions
In this case you should create a commit with the same flow as fix flow.
And after merge, you should cherry-pick merge commit on release
branch.
Hotfix for specific version
This case is simplier, you can create branch from release
branch and merge it in release
branch.
How to deploy
We have identified two type of deployment:
- Non production environment
- Production environment
Deploy on non production environment
Non production deployments are run on master
branch.
Deploy on production environment
To launch deployment on production environment, you need to tag your repository.
Updating the changelog
Every new feature, bugfix, chore task, etc... should result in a new entry in the changelog file. The convention of this file is strongly inspired from the Keep a Changelog standard.
An Unreleased
section should always be present at file top. In every new merge request, add your modifications in the Unreleased
section with the appropriate sub-section:
Added
for new features.Changed
for changes in existing functionality. Add the BREAKING tag at the beginning of lines including a breaking change.Deprecated
for soon-to-be removed features.Removed
for now removed features.Fixed
for any bug fixes.Security
in case of vulnerabilities.
The developer releasing the version is responsible for the update of the Unreleased
section. They must follow those steps just after having created the version tag:
- Rename
Unreleased
to<tag version> / <release date: YYYY-MM-DD>
- Create the new
Unreleased
section