summaryrefslogtreecommitdiffstats
path: root/.gitlab/rules.yml
blob: 8fc40a7f02d65c3bf37d6dd0758dde20c9f4eb48 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Rules for where jobs can run

.run_manually:
    rules:
        - if: '$CMAKE_CI_PACKAGE != null'
          when: never
        - if: '$CMAKE_CI_NIGHTLY == "true"'
          when: on_success
        - if: '$CMAKE_CI_JOB_NIGHTLY == "true"'
          when: never
        - if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true"'
          when: delayed
          start_in: 5 minutes
        - if: '($CMAKE_CI_NO_MR == "true" && $CI_MERGE_REQUEST_ID)'
          when: never
        - if: '$CI_MERGE_REQUEST_ID'
          when: manual
        - if: '$CI_PROJECT_PATH == "cmake/cmake" && $CI_PIPELINE_SOURCE == "schedule"'
          when: on_success
        - if: '$CI_PROJECT_PATH == "cmake/cmake"'
          when: manual
        - when: never

.run_automatically:
    rules:
        - if: '$CMAKE_CI_PACKAGE != null'
          when: never
        - if: '$CMAKE_CI_NIGHTLY == "true"'
          when: on_success
        - if: '$CMAKE_CI_JOB_NIGHTLY == "true"'
          when: never
        - if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true"'
          when: on_success
        - if: '($CMAKE_CI_NO_MR == "true" && $CI_MERGE_REQUEST_ID)'
          when: never
        - if: '$CI_MERGE_REQUEST_ID'
          when: on_success
        - if: '$CI_PROJECT_PATH == "cmake/cmake" && $CI_PIPELINE_SOURCE == "schedule"'
          when: on_success
        - if: '$CI_PROJECT_PATH == "cmake/cmake"'
          when: delayed
          start_in: 5 minutes
        - when: never

.run_dependent:
    rules:
        - if: '$CMAKE_CI_PACKAGE != null'
          when: never
        - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_NIGHTLY_IGNORE_DEPS == "true")'
          when: always
        - if: '$CMAKE_CI_NIGHTLY == "true"'
          when: on_success
        - if: '$CMAKE_CI_JOB_NIGHTLY == "true"'
          when: never
        - if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true"'
          when: on_success
        - if: '($CMAKE_CI_NO_MR == "true" && $CI_MERGE_REQUEST_ID)'
          when: never
        - if: '$CI_MERGE_REQUEST_ID'
          when: on_success
        - if: '$CI_PROJECT_PATH == "cmake/cmake"'
          when: on_success
        - when: never

.run_only_for_package:
    rules:
        - if: '$CMAKE_CI_PACKAGE == "dev"'
          variables:
              RSYNC_DESTINATION: "dev"
          when: on_success
        - if: '$CMAKE_CI_PACKAGE != null && $CI_JOB_STAGE == "prep"'
          when: manual
        - if: '$CMAKE_CI_PACKAGE != null && $CI_JOB_STAGE != "package" && $CI_JOB_STAGE != "upload"'
          when: on_success
        - when: never

.run_cmake_org_help:
    rules:
        - if: '$CMAKE_CI_PACKAGE =~ /v[0-9]+\.[0-9]+/'
          variables:
              RSYNC_DESTINATION: "$CMAKE_CI_PACKAGE"
              CMAKE_CI_SPHINX_QTHELP: "ON"
              CMAKE_CI_VERSION_NO_GIT: "ON"
          when: manual
        - if: '$CMAKE_CI_PROJECT_MAIN_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_MAIN_BRANCH == $CI_COMMIT_BRANCH'
          variables:
              RSYNC_DESTINATION: "git-master"
              CMAKE_CI_SPHINX_QTHELP: "OFF"
              CMAKE_CI_VERSION_NO_GIT: "OFF"
          when: on_success
        - if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH'
          variables:
              RSYNC_DESTINATION: "git-stage"
              CMAKE_CI_SPHINX_QTHELP: "OFF"
              CMAKE_CI_VERSION_NO_GIT: "OFF"
          when: on_success
        - when: never