ci: make check-tree job optional for branches other than main

This commit is contained in:
Íñigo Huguet 2024-12-27 09:06:08 +01:00
parent 1cd59aa431
commit 76433688e2
2 changed files with 17 additions and 5 deletions

View file

@ -57,11 +57,11 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag".
ALPINE_TAG: 'tag-21b37b356080'
CENTOS_TAG: 'tag-7397c485797c'
DEBIAN_TAG: 'tag-501092ec7ae8'
FEDORA_TAG: 'tag-7397c485797c'
UBUNTU_TAG: 'tag-501092ec7ae8'
ALPINE_TAG: 'tag-f2be574dc218'
CENTOS_TAG: 'tag-bb4b8be087a5'
DEBIAN_TAG: 'tag-3f002f353fc3'
FEDORA_TAG: 'tag-bb4b8be087a5'
UBUNTU_TAG: 'tag-3f002f353fc3'
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
@ -360,6 +360,12 @@ check-tree:
needs:
- "tier1:fedora:40@prep"
stage: tier1
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
allow_failure: true
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
allow_failure: true
- if: $CI_PIPELINE_SOURCE != 'schedule'
script:
- date '+%Y%m%d-%H%M%S'; clang-format --version
- date '+%Y%m%d-%H%M%S'; black --version

View file

@ -204,6 +204,12 @@ check-tree:
needs:
- "tier{{default_distro.tier}}:{{default_distro.name}}:{{default_distro.versions[0]}}@prep"
stage: tier1
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
allow_failure: true
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
allow_failure: true
- if: $CI_PIPELINE_SOURCE != 'schedule'
script:
- date '+%Y%m%d-%H%M%S'; clang-format --version
- date '+%Y%m%d-%H%M%S'; black --version