diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-02 16:44:06 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-02 16:44:06 +0300 |
commit | c03da1caade637298ca96e59cea990b0827539c9 (patch) | |
tree | 1746747a045835d0148dfd727aa3275b6b44bc1c /doc | |
parent | 329e067ff1d235af38f686145b03ced6c1fe7d85 (diff) |
Extend yml syntax for only and except to support specifying repository path
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ci/yaml/README.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index ea8f72bc135..0c1d8cfdff6 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -169,7 +169,7 @@ This are two parameters that allow for setting a refs policy to limit when jobs There are a few rules that apply to usage of refs policy: -1. `only` and `except` are exclusive. If both `only` and `except` are defined in job specification only `only` is taken into account. +1. `only` and `except` are inclusive. If both `only` and `except` are defined in job specification the ref is filtered by `only` and `except`. 1. `only` and `except` allow for using the regexp expressions. 1. `only` and `except` allow for using special keywords: `branches` and `tags`. These names can be used for example to exclude all tags and all branches. @@ -182,6 +182,18 @@ job: - branches # use special keyword ``` +1. `only` and `except` allow for specify repository path to filter jobs for forks. +The repository path can be used to have jobs executed only for parent repository. + +```yaml +job: + only: + - branches@gitlab-org/gitlab-ce + except: + - master@gitlab-org/gitlab-ce +``` +The above will run `job` for all branches, except master on `gitlab-org/gitlab-ce` repository only. + ### tags `tags` is used to select specific runners from the list of all runners that are allowed to run this project. |