diff options
author | Sean McGivern <sean@gitlab.com> | 2019-06-10 08:56:25 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-06-10 08:56:25 +0100 |
commit | 51713627f61b5897c0697f7574d8c3d7c3e93c41 (patch) | |
tree | 21cf681e4c976bd2012af21ba749f952624de9b5 /doc/ci/merge_request_pipelines/index.md | |
parent | 6a4aa3f9be8b31e5d76750d40f15f5fef2c792af (diff) | |
parent | e3072811475dcd563911a78fce85263b693d3fd6 (diff) | |
download | gitlab-ce-51713627f61b5897c0697f7574d8c3d7c3e93c41.tar.gz |
Merge remote-tracking branch 'origin/master' into patch-56
Diffstat (limited to 'doc/ci/merge_request_pipelines/index.md')
-rw-r--r-- | doc/ci/merge_request_pipelines/index.md | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/doc/ci/merge_request_pipelines/index.md b/doc/ci/merge_request_pipelines/index.md index 3c26a38e3de..fe2fc790505 100644 --- a/doc/ci/merge_request_pipelines/index.md +++ b/doc/ci/merge_request_pipelines/index.md @@ -1,3 +1,7 @@ +--- +type: reference +--- + # Pipelines for merge requests NOTE: **Note**: @@ -70,15 +74,18 @@ when a merge request was created or updated. For example: ## Pipelines for Merged Results **[PREMIUM]** > [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/7380) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.10. +> This feature is disabled by default until we resolve issues with [contention handling](https://gitlab.com/gitlab-org/gitlab-ee/issues/9186), but [can be enabled manually](#enabling-pipelines-for-merged-results). It's possible for your source and target branches to diverge, which can result in the scenario that source branch's pipeline was green, the target's pipeline was green, -but the combined output fails. By having your merge request pipeline automatically +but the combined output fails. + +By having your merge request pipeline automatically create a new ref that contains the merge result of the source and target branch (then running a pipeline on that ref), we can better test that the combined result is also valid. -From GitLab 11.10, pipelines for merge requests run by default +GitLab can run pipelines for merge requests on this merged result. That is, where the source and target branches are combined into a new ref and a pipeline for this ref validates the result prior to merging. @@ -95,7 +102,7 @@ get out of WIP status or resolve merge conflicts as soon as possible. ### Enabling Pipelines for Merged Results -This feature disabled by default until we resolve issues with [contention handling](https://gitlab.com/gitlab-org/gitlab-ee/issues/9186). It can be enabled at the project level: +To enable pipelines on merged results at the project level: 1. Visit your project's **Settings > General** and expand **Merge requests**. 1. Check **Merge pipelines will try to validate the post-merge result prior to merging**. @@ -103,6 +110,10 @@ This feature disabled by default until we resolve issues with [contention handli ![Merge request pipeline config](img/merge_request_pipeline_config.png) +CAUTION: **Warning:** +Make sure your `gitlab-ci.yml` file is [configured properly for pipelines for merge requests](#configuring-pipelines-for-merge-requests), +otherwise pipelines for merged results won't run and your merge requests will be stuck in an unresolved state. + ### Pipelines for Merged Result's limitations - This feature requires [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner) 11.9 or newer. @@ -193,5 +204,5 @@ By using pipelines for merge requests, GitLab exposes additional predefined vari Those variables contain information of the associated merge request, so that it's useful to integrate your job with [GitLab Merge Request API](../../api/merge_requests.md). -You can find the list of avilable variables in [the reference sheet](../variables/predefined_variables.md). +You can find the list of available variables in [the reference sheet](../variables/predefined_variables.md). The variable names begin with the `CI_MERGE_REQUEST_` prefix. |