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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
7b1ad331
Commit
7b1ad331
authored
Feb 21, 2020
by
Fabio Pitino
Committed by
Marcel Amirault
Feb 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document merge request child pipelines
parent
d1f06af2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
doc/ci/parent_child_pipelines.md
doc/ci/parent_child_pipelines.md
+46
-0
No files found.
doc/ci/parent_child_pipelines.md
View file @
7b1ad331
...
@@ -80,6 +80,52 @@ microservice_a:
...
@@ -80,6 +80,52 @@ microservice_a:
strategy
:
depend
strategy
:
depend
```
```
## Merge Request child pipelines
To trigger a child pipeline as a
[
Merge Request Pipeline
](
merge_request_pipelines/index.md
)
we need to:
-
Set the trigger job to run on merge requests:
```
yaml
# parent .gitlab-ci.yml
microservice_a
:
trigger
:
include
:
path/to/microservice_a.yml
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
```
-
Configure the child pipeline by either:
-
Setting all jobs in the child pipeline to evaluate in the context of a merge request:
```yaml
# child path/to/microservice_a.yml
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
job1:
script: ...
job2:
script: ...
```
-
Alternatively, setting the rule per job. For example, to create only
`job1`
in
the context of merge request pipelines:
```yaml
# child path/to/microservice_a.yml
job1:
script: ...
rules:
- if: $CI_MERGE_REQUEST_ID
job2:
script: ...
```
## Limitations
## Limitations
A parent pipeline can trigger many child pipelines, but a child pipeline cannot trigger
A parent pipeline can trigger many child pipelines, but a child pipeline cannot trigger
...
...
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