OSDN Git Service

gitlab: convert Cirrus jobs to .base_job_template
[qmiga/qemu.git] / .gitlab-ci.d / base.yml
1
2 # The order of rules defined here is critically important.
3 # They are evaluated in order and first match wins.
4 #
5 # Thus we group them into a number of stages, ordered from
6 # most restrictive to least restrictive
7 #
8 .base_job_template:
9   rules:
10     #############################################################
11     # Stage 1: exclude scenarios where we definitely don't
12     # want jobs to run
13     #############################################################
14
15     # Cirrus jobs can't run unless the creds / target repo are set
16     - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == "" || $CIRRUS_API_TOKEN == "")'
17       when: never
18
19
20     #############################################################
21     # Stage 2: fine tune execution of jobs in specific scenarios
22     # where the catch all logic is inapprorpaite
23     #############################################################
24
25     # Optional jobs should not be run unless manually triggered
26     - if: '$QEMU_JOB_OPTIONAL'
27       when: manual
28       allow_failure: true
29
30
31     #############################################################
32     # Stage 3: catch all logic applying to any job not matching
33     # an earlier criteria
34     #############################################################
35
36     # Jobs can run if any jobs they depend on were successfull
37     - when: on_success