Explorar o código

gitlab: use template

Nathalie Furmento %!s(int64=4) %!d(string=hai) anos
pai
achega
b0c586c880
Modificáronse 1 ficheiros con 10 adicións e 8 borrados
  1. 10 8
      .gitlab-ci.yml

+ 10 - 8
.gitlab-ci.yml

@@ -30,20 +30,22 @@ build:
       when: never  # Prevent pipeline run for push event
     - when: always # Run pipeline for all other cases
 
-check:
+.check_template:
   stage: deploy
-  script:
-    - ./contrib/gitlab/deploy.sh
+  needs: [build]
+  dependencies:
+    - build
   rules:
     - if: '$CI_PIPELINE_SOURCE == "push"'
       when: never  # Prevent pipeline run for push event
     - when: always # Run pipeline for all other cases
 
+check:
+  extend: .check_template
+  script:
+    - ./contrib/gitlab/deploy.sh
+
 simgrid:
-  stage: deploy
+  extend: .check_template
   script:
     - ./contrib/gitlab/simgrid.sh
-  rules:
-    - if: '$CI_PIPELINE_SOURCE == "push"'
-      when: never  # Prevent pipeline run for push event
-    - when: always # Run pipeline for all other cases