Browse Source

gitlab-ci: use a single rules block for "automatic" jobs

Co-authored-by: Brad King <[email protected]>
Ben Boeckel 1 month ago
parent
commit
b1ec96bfa7
2 changed files with 10 additions and 11 deletions
  1. 7 7
      .gitlab-ci.yml
  2. 3 4
      .gitlab/rules.yml

+ 7 - 7
.gitlab-ci.yml

@@ -119,7 +119,7 @@ l:spellcheck:
     extends:
         - .cmake_spellcheck_linux
         - .linux_x86_64_tags
-        - .run_automatically
+        - .rules
 
 l:iwyu-debian13:
     extends:
@@ -127,7 +127,7 @@ l:iwyu-debian13:
         - .cmake_build_linux
         - .linux_x86_64_tags
         - .cmake_cdash_artifacts
-        - .run_automatically
+        - .rules
 
 l:tidy-fedora43:
     extends:
@@ -136,7 +136,7 @@ l:tidy-fedora43:
         - .cmake_tidy_artifacts
         - .linux_x86_64_tags
         - .cmake_cdash_artifacts
-        - .run_automatically
+        - .rules
 
 l:sphinx-fedora43:
     extends:
@@ -144,7 +144,7 @@ l:sphinx-fedora43:
         - .cmake_build_linux
         - .cmake_sphinx_artifacts
         - .linux_x86_64_tags
-        - .run_automatically
+        - .rules
     variables:
         CMAKE_CI_JOB_CONTINUOUS: "true"
         CMAKE_CI_JOB_HELP: "true"
@@ -154,7 +154,7 @@ l:clang-analyzer-fedora43:
         - .fedora43_clang_analyzer
         - .cmake_build_linux
         - .linux_x86_64_tags
-        - .run_automatically
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
 
@@ -163,14 +163,14 @@ l:clang-fuzzing-fedora43:
         - .fedora43_clang_fuzzing
         - .cmake_build_linux
         - .linux_x86_64_tags
-        - .run_automatically
+        - .rules
 
 l:clazy-fedora43:
     extends:
         - .fedora43_clazy
         - .cmake_build_linux
         - .linux_x86_64_tags
-        - .run_automatically
+        - .rules
 
 # Coverage builds
 

+ 3 - 4
.gitlab/rules.yml

@@ -188,10 +188,9 @@ workflow:
         # Other pipelines run manual jobs upon request.
         - if: '$CMAKE_CI_JOB_RUN_MANUALLY == "true"'
           when: manual
-
-.run_automatically:
-    rules:
-        - when: delayed
+        # Other pipelines run jobs in the `build` stage automatically after 5 minutes.
+        - if: '$CI_JOB_STAGE == "build"'
+          when: delayed
           start_in: 5 minutes
 
 .run_dependent: