From dfff21f559c9bf68f96c5ce3d446376dc086b889 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Wed, 29 May 2024 15:02:13 +0200 Subject: [PATCH] gitlab: adjust ci.template The recommendations from freedesktop [1] about how to maintain a Gitlab project changed therefore we must adapt the rules. Solves: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1549 [1] https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/540#what-it-means-for-me-a-maintainer-of-a-project-part-of-gitlabfreedesktoporg --- .gitlab-ci.yml | 14 ++++++++------ .gitlab-ci/ci.template | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d47903aa7..6f26ba9b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,11 +59,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". - ALPINE_TAG: 'tag-ed94fd969369' - CENTOS_TAG: 'tag-dc93a9c129f8' - DEBIAN_TAG: 'tag-3766b6cf1e7d' - FEDORA_TAG: 'tag-dc93a9c129f8' - UBUNTU_TAG: 'tag-3766b6cf1e7d' + ALPINE_TAG: 'tag-75ecbb5bcef4' + CENTOS_TAG: 'tag-ea45f0a3f632' + DEBIAN_TAG: 'tag-1ccef04c657b' + FEDORA_TAG: 'tag-ea45f0a3f632' + UBUNTU_TAG: 'tag-1ccef04c657b' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' @@ -680,5 +680,7 @@ clean-images: workflow: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS + when: never + - if: $CI_COMMIT_BRANCH - if: $CI_PIPELINE_SOURCE == 'schedule' diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 28e4ca25e..85b360185 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -267,5 +267,7 @@ clean-images: workflow: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS + when: never + - if: $CI_COMMIT_BRANCH - if: $CI_PIPELINE_SOURCE == 'schedule'