diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-03-22 09:42:40 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2016-03-22 09:42:40 +0000 |
commit | fc6ee359287c6bd286e32ce808e7069714e1732e (patch) | |
tree | c4a4d3a5e0bef652c364dcb3f4b9f9ff63d8c87e /doc/gitlab-basics/start-using-git.md | |
parent | 383ead5d58a0553b7700aa922ad67c41b16eadf7 (diff) | |
parent | 5adaabdd30388993ce547a782146d166d30cfc9b (diff) | |
download | gitlab-ce-fc6ee359287c6bd286e32ce808e7069714e1732e.tar.gz |
Merge branch 'feature-ci-only-except-trigger' into 'master'
CI: Add 'triggers' keyword to 'only' and 'except' lists to allow control over when triggers cause builds to run
Currently, the `only` and `except` keywords in `.gitlab-ci.yml` only accept ref names or the special `branches` and `tags` keywords. However, these are primarily useful when controlling how repository activity affects the creation of builds. In my case, instead of building on every commit, I'd like to use the following logic:
- If the repository is tagged, do a build.
- Any other normal commits should not cause a build.
- If a build is triggered via the API, always create one for the specified ref.
From what I can tell, this isn't possible via the existing YAML syntax. In this MR, I introduce a new keyword `triggers` that goes along with `branches` and `tags`. I can implement the logic above using the following job configuration:
```yaml
only:
- tags
- triggers
```
I updated the tests and documentation to reflect this and everything seems to pass.
See merge request !3230
Diffstat (limited to 'doc/gitlab-basics/start-using-git.md')
0 files changed, 0 insertions, 0 deletions