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
d033dff1
Commit
d033dff1
authored
Nov 06, 2020
by
drew
Committed by
Marcel Amirault
Nov 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation: Add a warning about rules:changes with no PushEvent
parent
f8e050cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+12
-4
No files found.
doc/ci/yaml/README.md
View file @
d033dff1
...
@@ -1408,10 +1408,18 @@ To determine if jobs should be added to a pipeline, `rules: changes` clauses che
...
@@ -1408,10 +1408,18 @@ To determine if jobs should be added to a pipeline, `rules: changes` clauses che
the files changed by Git push events.
the files changed by Git push events.
`rules: changes`
works exactly the same way as
[
`only: changes` and `except: changes`
](
#onlychangesexceptchanges
)
,
`rules: changes`
works exactly the same way as
[
`only: changes` and `except: changes`
](
#onlychangesexceptchanges
)
,
accepting an array of paths. Similarly, it always returns true if there is no
accepting an array of paths.
Git push event, for example, when a new tag is created. It's recommended to use it
only with branch pipelines or merge request pipelines. For example, it's common to
It always returns true and adds jobs to the pipeline if there is no Git push event.
use
`rules: changes`
with one of the following
`if`
clauses:
For example, jobs with
`rules: changes`
always run on scheduled and tag pipelines,
because they are not associated with a Git push event. Only certain pipelines have
a Git push event associated with them:
-
All pipelines with a
`$CI_PIPELINE_SOURCE`
of
`merge_request`
or
`external_merge_request`
.
-
Branch pipelines, which have the
`$CI_COMMIT_BRANCH`
variable present and a
`$CI_PIPELINE_SOURCE`
of
`push`
.
It's recommended to use it only with branch pipelines or merge request pipelines.
For example, it's common to use
`rules: changes`
with one of the following
`if`
clauses:
-
`if: $CI_COMMIT_BRANCH`
-
`if: $CI_COMMIT_BRANCH`
-
`if: '$CI_PIPELINE_SOURCE == "merge_request_event"'`
-
`if: '$CI_PIPELINE_SOURCE == "merge_request_event"'`
...
...
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