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
7193a1af
Commit
7193a1af
authored
Jan 09, 2020
by
drew
Committed by
drew cimino
Jan 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply suggestions to doc/ci/yaml/README.md
parent
a28ddb46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+7
-12
No files found.
doc/ci/yaml/README.md
View file @
7193a1af
...
...
@@ -728,18 +728,18 @@ Learn more about [variables expressions](../variables/README.md#environment-vari
Using the
`changes`
keyword with
`only`
or
`except`
makes it possible to define if
a job should be created based on files modified by a Git push event.
This means the
`only:changes`
policy is
only useful for pipelines with
:
This means the
`only:changes`
policy is
useful for pipelines where
:
-
`$CI_PIPELINE_SOURCE == 'push'`
-
`$CI_PIPELINE_SOURCE == 'merge_request_event'`
-
`$CI_PIPELINE_SOURCE == 'external_pull_request_event'`
If there is no Git push event,
as is the case in
pipelines with
[
any other sourc
e
](
../variables/predefined_variables.html#variables-reference
)
,
If there is no Git push event,
such as for
pipelines with
[
sources other than the three abov
e
](
../variables/predefined_variables.html#variables-reference
)
,
`changes`
cannot determine if a given file is new or old, and will always
return true.
For example
:
A basic example of using
`only: changes`
:
```
yaml
docker build
:
...
...
@@ -920,14 +920,9 @@ at all, the behavior defaults to `job:when`, which continues to default to
#### `rules:changes`
`changes`
works exactly the same way as
[
`only`/`except`
](
#onlychangesexceptchanges
)
,
accepting an array of paths. This includes the caveat about using
`changes:`
in
pipelines that do not have an associated Git push event.
CAUTION:
**Warning:**
Pipelines triggered via
`web`
,
`trigger`
,
`schedule`
,
`api`
,
`external`
,
`pipeline`
, or
`chat`
, the pipeline
**
will have no modified paths and
`changes`
clauses will always evaluate to true
**
.
`rules: changes`
works exactly the same way as
`only: changes`
and
`except: changes`
,
accepting an array of paths. Similarly, it will always return true if there is no
Git push event. See
[
`only/except: changes`
](
#onlychangesexceptchanges
)
for more information.
For example:
...
...
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