Difference between revisions of "GitLab CI only:"
Jump to navigation
Jump to search
Line 36: | Line 36: | ||
== See also == | == See also == | ||
+ | * {{gitlab-ci.yml}} | ||
* {{gitlab-ci.yml}} | * {{gitlab-ci.yml}} | ||
* {{GitLab CI}} | * {{GitLab CI}} | ||
[[Category:GitLab]] | [[Category:GitLab]] |
Revision as of 08:47, 28 September 2022
https://docs.gitlab.com/ee/ci/yaml/#only--except
Official example
job1: script: echo only: - main - /^issue-.*$/ - merge_requests job2: script: echo except: - main - /^stable-branch.*$/ - schedules
Both are equivalent (official example):
job1: script: echo only: - branches job2: script: echo only: refs: - branches
except:
See also
gitlab-ci.yml
,job: | stage: | stages: | artifacts: | include: | script: | when: | only: | needs:
gitlab-ci.yml
,job: | stage: | stages: | artifacts: | include: | script: | when: | only: | needs:
- GitLab CI, variables, templates, executors,
.gitlab-ci.yml, .gitlab/
, Credential helpers, notifications, pipeline editor, Keyword reference, Changelog,ContainersNotReady
, GitLab environments
Advertising: