feat(workflow): Changes our common workflow to git-flow-with-merge-request
According to discussion in ci-cd#237 / weekly
This commit is contained in:
parent
cd47250147
commit
97352e8270
@ -1,12 +0,0 @@
|
||||
:gitlab-ci-file: common/common-ci-workflow.gitlab-ci.yml
|
||||
|
||||
[[Common-Workflow]]
|
||||
== Common Workflow
|
||||
|
||||
Within the `{gitlab-ci-file}` file we provide a common workflow.
|
||||
This workflow runs all pipelines (including branch pipelines, tag pipelines, merge request pipelines, triggerd pipelines, shedules-pipelines ...).
|
||||
However, it prevents that a branch pipeline starts, when there is an open merge request.
|
||||
To use our common workflow, just import the template.
|
||||
|
||||
:template: {gitlab-ci-file}
|
||||
include::../../../template-printer.adoc[]
|
||||
@ -0,0 +1,11 @@
|
||||
:gitlab-ci-file: common/workflow-gitflow.gitlab-ci.yml
|
||||
|
||||
[[Common-Workflow]]
|
||||
== Common Workflow
|
||||
|
||||
Within the `{gitlab-ci-file}` file we provide our common workflow, the https://docs.gitlab.com/ee/ci/yaml/workflow.html#git-flow-with-merge-request-pipelines[Git Flow with merge request workflow].
|
||||
This workflow runs pipelines for merge requests, tags, and protected branches.
|
||||
To use our common workflow, just import the template.
|
||||
|
||||
:template: {gitlab-ci-file}
|
||||
include::../../../template-printer.adoc[]
|
||||
@ -35,7 +35,7 @@ toc::[]
|
||||
|
||||
include::generalInformation.adoc[leveloffset=1]
|
||||
include::chapters/templates/common/common-ci-variablen.adoc[leveloffset=1]
|
||||
include::chapters/templates/common/common-ci-workflow.adoc[leveloffset=1]
|
||||
include::chapters/templates/common/workflow-gitflow.adoc[leveloffset=1]
|
||||
|
||||
== Contribution
|
||||
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
workflow:
|
||||
rules:
|
||||
# Prevent branch pipelines when there is an open merge request
|
||||
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
|
||||
when: never
|
||||
- when: always
|
||||
5
templates/common/workflow-gitflow.gitlab-ci.yml
Normal file
5
templates/common/workflow-gitflow.gitlab-ci.yml
Normal file
@ -0,0 +1,5 @@
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_COMMIT_TAG
|
||||
- if: $CI_COMMIT_REF_PROTECTED
|
||||
Loading…
Reference in New Issue
Block a user