BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9d64e44e
Commit
9d64e44e
authored
Jul 28, 2017
by
Marcia Ramos
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'docs/ci-only-except' into 'master'
Explain all possible values of 'only' and 'except' Closes #34119 See merge request !13138
parents
0bb58ff8
c4938045
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
README.md
doc/ci/yaml/README.md
+17
-4
No files found.
doc/ci/yaml/README.md
View file @
9d64e44e
...
...
@@ -441,13 +441,25 @@ There are a few rules that apply to the usage of refs policy:
*
`only`
and
`except`
are inclusive. If both
`only`
and
`except`
are defined
in a job specification, the ref is filtered by
`only`
and
`except`
.
*
`only`
and
`except`
allow the use of regular expressions.
*
`only`
and
`except`
allow the use of special keywords:
`api`
,
`branches`
,
`external`
,
`tags`
,
`pushes`
,
`schedules`
,
`triggers`
, and
`web`
*
`only`
and
`except`
allow to specify a repository path to filter jobs for
forks.
In addition,
`only`
and
`except`
allow the use of special keywords:
|
**Value**
|
**Description**
|
| --------- | ---------------- |
|
`branches`
| When a branch is pushed. |
|
`tags`
| When a tag is pushed. |
|
`api`
| When pipeline has been triggered by a second pipelines API (not triggers API). |
|
`external`
| When using CI services other than GitLab. |
|
`pipelines`
| For multi-project triggers, created using the API with
`CI_JOB_TOKEN`
. |
|
`pushes`
| Pipeline is triggered by a
`git push`
by the user. |
|
`schedules`
| For
[
scheduled pipelines
][
schedules
]
. |
|
`triggers`
| For pipelines created using a trigger token. |
|
`web`
| For pipelines created using
**Run pipeline**
button in GitLab UI (under your project's
**Pipelines**
). |
In the example below,
`job`
will run only for refs that start with
`issue-`
,
whereas all branches will be skipped
.
whereas all branches will be skipped
:
```
yaml
job
:
...
...
@@ -460,7 +472,7 @@ job:
```
In this example,
`job`
will run only for refs that are tagged, or if a build is
explicitly requested via an API trigger or a
[
Pipeline Schedule
]
(
../../user/project/pipelines/schedules.md
)
.
explicitly requested via an API trigger or a
[
Pipeline Schedule
]
[
schedules
]
:
```
yaml
job
:
...
...
@@ -1532,3 +1544,4 @@ CI with various languages.
[
ce-7983
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7983
[
ce-7447
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7447
[
ce-3442
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3442
[
schedules
]:
../../user/project/pipelines/schedules.md
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