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
cb9e01ae
Commit
cb9e01ae
authored
Sep 14, 2020
by
HeroicHitesh
Committed by
Marcel Amirault
Sep 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc: Improve only/except(advanced)
parent
30c193a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+8
-10
No files found.
doc/ci/yaml/README.md
View file @
cb9e01ae
...
@@ -1739,12 +1739,13 @@ Four keys are available:
...
@@ -1739,12 +1739,13 @@ Four keys are available:
If you use multiple keys under
`only`
or
`except`
, the keys will be evaluated as a
If you use multiple keys under
`only`
or
`except`
, the keys will be evaluated as a
single conjoined expression. That is:
single conjoined expression. That is:
-
`only:`
means "include this job if all of the conditions match"
.
-
`only:`
includes the job if
**all**
of the keys have at least one condition that matches
.
-
`except:`
means "exclude this job if any of the conditions match"
.
-
`except:`
excludes the job if
**any**
of the keys have at least one condition that matches
.
With
`only`
, individual keys are logically joined by an AND:
With
`only`
, individual keys are logically joined by an
`AND`
. A job is added to
the pipeline if the following is true:
> (any of refs) AND (any of variables) AND (any of changes) AND (if Kubernetes is active)
-
`(any listed refs are true) AND (any listed variables are true) AND (any listed changes are true) AND (any chosen Kubernetes status matches)`
In the example below, the
`test`
job will
`only`
be created when
**all**
of the following are true:
In the example below, the
`test`
job will
`only`
be created when
**all**
of the following are true:
...
@@ -1764,13 +1765,10 @@ test:
...
@@ -1764,13 +1765,10 @@ test:
kubernetes
:
active
kubernetes
:
active
```
```
`except`
is implemented as a negation of this complete expression:
With
`except`
, individual keys are logically joined by an
`OR`
. A job is
**not**
added if the following is true:
> NOT((any of refs) AND (any of variables) AND (any of changes) AND (if Kubernetes is active))
-
`(any listed refs are true) OR (any listed variables are true) OR (any listed changes are true) OR (a chosen Kubernetes status matches)`
This means the keys are treated as if joined by an OR. This relationship could be described as:
> (any of refs) OR (any of variables) OR (any of changes) OR (if Kubernetes is active)
In the example below, the
`test`
job will
**not**
be created when
**any**
of the following are true:
In the example below, the
`test`
job will
**not**
be created when
**any**
of the following are true:
...
...
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