mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-27 19:50:44 +01:00
ci: make check-tree optional for branches other than main
Old branches tend to be formatted with a different versions of clang-format, so when patches are backported, they introduce some differences in formatting, making the check-tree job to fail. These changes in formatting are normally small, and we don't pay much attention to them, causing that the pipelines are always red, increasing the work required to check if there are important failures or not. Make check-tree optional for branches other than main. This way, failures will be shown as a "warning", and if a pipeline only shows a warning we don't need to inspect it. (cherry picked from commit9e47c9bc6a) (cherry picked from commitb497ce4372) (cherry picked from commitf43af853e6) (cherry picked from commita85941660a)
This commit is contained in:
parent
7fda86a9d7
commit
0328eb84ac
2 changed files with 16 additions and 4 deletions
|
|
@ -53,10 +53,10 @@ variables:
|
|||
#
|
||||
# This is done by running `ci-fairy generate-template` and possibly bumping
|
||||
# ".default_tag".
|
||||
ALPINE_TAG: 'tag-ae5d79b9f950'
|
||||
CENTOS_TAG: 'tag-0e91ee4c8c7c'
|
||||
DEBIAN_TAG: 'tag-05fba9bac327'
|
||||
UBUNTU_TAG: 'tag-05fba9bac327'
|
||||
ALPINE_TAG: 'tag-9b85960aac09'
|
||||
CENTOS_TAG: 'tag-574648c5d22d'
|
||||
DEBIAN_TAG: 'tag-7d3d5a87531b'
|
||||
UBUNTU_TAG: 'tag-7d3d5a87531b'
|
||||
|
||||
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
||||
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||
|
|
@ -284,6 +284,12 @@ check-tree:
|
|||
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||
needs:
|
||||
- "tier1:debian:12@prep"
|
||||
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'
|
||||
stage: tier1
|
||||
script:
|
||||
- date '+%Y%m%d-%H%M%S'; clang-format --version
|
||||
|
|
|
|||
|
|
@ -203,6 +203,12 @@ check-tree:
|
|||
FDO_DISTRIBUTION_TAG: ${{default_distro.name.upper()}}_TAG
|
||||
needs:
|
||||
- "tier{{default_distro.tier}}:{{default_distro.name}}:{{default_distro.versions[0]}}@prep"
|
||||
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'
|
||||
stage: tier1
|
||||
script:
|
||||
- date '+%Y%m%d-%H%M%S'; clang-format --version
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue