Git flow workflow component
Usage
- Ensure your projects have a description
- Set
GITLAB_TOKENas a masked, protected and hidden variable for your group - Create and protect your
mainanddevelopbranches - Create GitLab pipeline file
.gitlab-ci.yml:
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/workflow@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/semantic-release@stable
Branching
Roles
The following roles exist in the scenarios:
- Developer
- Creates the respective hot fix, bug fix, or feature branch
- Implements the respective functionality (=gets hands dirty)
- Pushes source code to the work branch created above
- Creates a merge request to the corresponding target branch after successful local testing (see workflow)
- Maintainer (=Team colleague)
- Reviews merge requests
- Decides whether a merge request should trigger a release
- Merges the merge request (see workflow)
Settings enabled by default
- Create development branch if it does not exist
- Protect Branches main, develop
- Disable force pushes on protected branches
- Branch rules
- fast forward merge
- Pipelines must succeed before merge
- Skipped pipelines are considered successful
- All discussions must be resolved
- Prevent approval my merge request author
- Merge request branch workflow
- Merge request branch workflow:
-
- feat/* -> develop
-
- fix/* -> develop
-
- hotfix/* -> main
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| autoconfigure-enabled | Enable or disable the automatic configuration of the pipeline. | true | boolean |
| development-branch | The name of the development branch. | develop | string |
| rules | The jobs that this job depends on. | [{"if":"$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH","when":"always"},{"when":"never"}] | array |