Files
CMake/.gitlab/rules.yml
Brad King e3519aced4 ci: configure rules to enable dependent jbos in continuous pipeline
Apply the rules from commit ff72dbfb14 (gitlab-ci: configure rules to
enable continuous builds of staged MRs, 2020-09-30, v3.19.0-rc1~70^2~1)
and commit 71665c8cb9 (gitlab-ci: Clarify conditions enabling jobs for
continuous build of stage, 2021-05-05, v3.21.0-rc1~218^2) to dependent
jobs too.
2022-03-02 15:05:19 -05:00

82 lines
3.1 KiB
YAML

# Rules for where jobs can run
.run_manually:
rules:
- if: '$CMAKE_CI_PACKAGE == "true"'
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 == "true"'
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 == "true"'
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 == "true"'
when: on_success
- when: never
.run_only_for_continuous_master:
rules:
- if: '$CMAKE_CI_PROJECT_MAIN_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_MAIN_BRANCH == $CI_COMMIT_BRANCH'
when: on_success
- when: never
.run_only_for_continuous_stage:
rules:
- if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH'
when: on_success
- when: never