From c40c0044a2a6746f8707c1692a642ed83ea2eca7 Mon Sep 17 00:00:00 2001 From: Nacho Barrientos <nacho.barrientos@cern.ch> Date: Tue, 11 Mar 2025 14:56:39 +0100 Subject: [PATCH] Actually run these jobs when they have to If "rules:" is present and no rules are evaluated true then the job is not added to the pipeline. The current configuration was correctly omitting the jobs in tags however there was nothing configuring them to run otherwise (!). This commit fixes that. On a tag the first rule will be evaluated true and, thanks to "when: never", the job won't be added as expected, ignoring the rest. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ebd77d..8e1999f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,7 @@ docs_lint: rules: - if: '$CI_COMMIT_TAG' when: never + - if: $CI_PIPELINE_SOURCE == "push" script: - dnf install -y python-pip - python3 -m pip install linkcheckmd @@ -27,6 +28,7 @@ yaml_lint: rules: - if: '$CI_COMMIT_TAG' when: never + - if: $CI_PIPELINE_SOURCE == "push" script: - dnf install -y epel-release - dnf install -y yamllint -- GitLab