1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Rules for where jobs can run
###
# Job variables:
# RUST_CI_RELEASE_ONLY
# Set to "true" to only perform for tag pipelines.
###
# When to even consider running a pipeline.
workflow:
rules:
# Run for merge requests.
- if: '$CI_MERGE_REQUEST_ID'
when: always
auto_cancel:
# Cancel all pipeline jobs if a new commit comes in on the branch.
on_new_commit: interruptible
# Do not run for other projects.
- if: '$CI_PROJECT_PATH != "utils/rust-git-topic-stage"'
when: never
# Run for schedules.
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: always
auto_cancel:
# Never cancel scheduled pipelines because of new commits.
on_new_commit: none
# Run for protected branches.
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
when: always
auto_cancel:
# Cancel all pipeline jobs if a new commit comes in on the branch.
on_new_commit: interruptible
# Run for tags.
- if: '$CI_COMMIT_TAG'
when: always
# Skip pipelines in all other cases.
- when: never
.rules:
rules:
# Run release-only jobs for tags.
- if: '$RUST_CI_RELEASE_ONLY == "true" && $CI_COMMIT_TAG'
when: on_success
# Skip release jobs without tag.
- if: '$RUST_CI_RELEASE_ONLY == "true"'
when: never
# Other jobs run right away.
- when: on_success