BigW Consortium Gitlab
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
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
administration | Loading commit data... | |
api | Loading commit data... | |
ci | Loading commit data... | |
customization | Loading commit data... | |
development | Loading commit data... | |
gitlab-basics | Loading commit data... | |
hooks | Loading commit data... | |
incoming_email | Loading commit data... | |
install | Loading commit data... | |
integration | Loading commit data... | |
legal | Loading commit data... | |
logs | Loading commit data... | |
markdown | Loading commit data... | |
migrate_ci_to_ce | Loading commit data... | |
monitoring/performance | Loading commit data... | |
operations | Loading commit data... | |
permissions | Loading commit data... | |
profile | Loading commit data... | |
project_services | Loading commit data... | |
public_access | Loading commit data... | |
raketasks | Loading commit data... | |
release | Loading commit data... | |
security | Loading commit data... | |
ssh | Loading commit data... | |
system_hooks | Loading commit data... | |
update | Loading commit data... | |
web_hooks | Loading commit data... | |
workflow | Loading commit data... | |
README.md | Loading commit data... |