Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2015-11-03 15:13:21 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2015-11-03 15:13:21 +0300
commit86c0d8d28983c4f6abbcbf461e422b2fe5962847 (patch)
tree54dbd46b12b64bc655ba329e2698e7ca90bf5b4d /doc
parent819cfcef59f127a9ad92dc969570b479088a6974 (diff)
parentfe34b745e71a3e4ebb18d77a186d24de23b50863 (diff)
Merge branch 'only-syntax' into 'master'
Extend yml syntax for only and except to support specifying repository path This allows to limit execution of jobs to specific repository. For example: ```yaml job: only: - branches@gitlab-org/gitlab-ce except: - master@gitlab-org/gitlab-ce ``` The above will run `job` for all branches on `gitlab-org/gitlab-ce`, except master. @dzaporozhets @JobV @vsizov Please review. See merge request !1720
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/yaml/README.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index ea8f72bc135..d117a2969be 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 on `gitlab-org/gitlab-ce`, except master .
+
### tags
`tags` is used to select specific runners from the list of all runners that are allowed to run this project.