gitlab-org--gitlab-foss/doc
Kamil Trzciński fc6ee35928 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
2016-03-22 09:42:40 +00:00
..
administration Unicorn worker killer is not Omnibus specific 2016-02-03 14:18:51 +02:00
api Merge branch 'master' into issue_12658 2016-03-21 23:22:21 +01:00
ci Merge branch 'feature-ci-only-except-trigger' into 'master' 2016-03-22 09:42:40 +00:00
customization Branded login page also in CE 2016-02-26 15:50:51 +01:00
development Add SCSS Lint, CSSComb config file, run SCSS Lint in GitLab CI, add documentation for SCSS Style Guide. 2016-03-14 20:33:54 -06:00
gitlab-basics correct compare_braches.png to /compare_branches.png and make sure it works in line 25 in add-merge-request.md 2016-02-20 12:20:58 +08:00
hooks Use relative links in doc, fix broken generated HTML links 2016-03-17 00:35:53 +01:00
incoming_email Update mailroom/postfix documentation [ci skip] 2016-01-14 11:26:24 -06:00
install Gitlab-workhorse tags have "v" now 2016-03-21 13:13:34 +01:00
integration Added omniauth-auth0 Gem + Applicable Documentation. 2016-03-16 13:12:20 +01:00
legal Reformats confusing '[named here]' section for 3rd party code attribution 2016-02-17 17:13:06 +00:00
logs Revert "Merge branch 'revert-satellites' into 'master' " 2015-08-11 14:33:31 +02:00
markdown Capitalize Rouge mentions 2016-03-10 16:12:50 -03:00
migrate_ci_to_ce Update ci to ce doc to make it clearer when you are done if you don't want to keep your data. 2015-10-05 16:39:58 +02:00
monitoring/performance Change InfluxDB admin username 2016-01-20 23:10:27 +01:00
operations Add 'resume' capability to parallel-rsync-repos 2015-12-08 15:08:22 +01:00
permissions Refactor external users docs 2016-03-17 09:24:06 +02:00
profile Add references to the rouge gem library 2016-01-25 22:36:44 +01:00
project_services Fixed headers for anchors 2016-03-07 16:29:22 -05:00
public_access Update public access documentation [ci skip] 2015-11-19 17:24:10 +02:00
raketasks web hooks to webhooks 2016-03-10 14:48:29 -05:00
release Use relative links in doc, fix broken generated HTML links 2016-03-17 00:35:53 +01:00
security Use relative links in doc, fix broken generated HTML links 2016-03-17 00:35:53 +01:00
ssh Fixed Window's commands for SSH Help. 2016-02-06 12:17:12 +00:00
system_hooks Include user_username in user_(add_to/remove_from)_(project/group) system hooks. 2016-01-07 12:54:54 -05:00
update Gitlab-workhorse tags have "v" now 2016-03-21 13:13:34 +01:00
web_hooks Merge branch 'rs-snippet-expires-api' into 'master' 2016-03-14 15:55:05 +00:00
workflow Use relative links in doc, fix broken generated HTML links 2016-03-17 00:35:53 +01:00
README.md Remove CI duplication. 2016-03-17 21:52:34 -07:00

Documentation

User documentation

Administrator documentation

Contributor documentation

  • Documentation styleguide Use this styleguide if you are contributing to documentation.
  • Development Explains the architecture and the guidelines for shell commands.
  • Legal Contributor license agreements.
  • Release How to make the monthly and security releases.