Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
04e861af
Commit
04e861af
authored
Feb 05, 2019
by
Jason Lenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new section describing usage in exclusion scenario
parent
55cb4bc9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
doc/ci/merge_request_pipelines/index.md
doc/ci/merge_request_pipelines/index.md
+43
-0
No files found.
doc/ci/merge_request_pipelines/index.md
View file @
04e861af
...
@@ -56,6 +56,49 @@ The same tag is shown on the pipeline's details:
...
@@ -56,6 +56,49 @@ The same tag is shown on the pipeline's details:
![
Pipeline's details
](
img/pipeline_detail.png
)
![
Pipeline's details
](
img/pipeline_detail.png
)
## Making all jobs run for your MR pipelines
The behavior of the
`only: merge_requests`
rule is such that _only_ jobs with
that rule are run in the context of a merge request; no other jobs will be run.
This behavior may not be intuitive when you want all of your jobs to run _except_
for one or two. Consider the following pipeline, with jobs A B and C. If you want
all pipelines to always run A and B, but only want C to run for a merge request,
you can set things up like this to make that work:
```
yaml
.only-default
:
&only-default
only
:
-
master
-
merge_requests
-
tags
A
:
<<
:
*only-default
script
:
-
...
B
:
<<
:
*only-default
script
:
-
...
C
:
script
:
-
...
only
:
-
merge_requests
```
Since A and B are getting the
`only:`
rule to execute in all cases, they will
always run. C specifies that it should only run for merge requests, so for any
pipeline except a merge request pipeline, it will not run.
As you can see, this will help you avoid a lot of boilerplate where you'd need
to add that only rule to all of your jobs in order to make them always run. You
can use this for scenarios like having only pipelines with merge requests get a
Review App set up, helping to save resources.
## Important notes about merge requests from forked projects
## Important notes about merge requests from forked projects
Note that the current behavior is subject to change. In the usual contribution
Note that the current behavior is subject to change. In the usual contribution
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment