瀏覽代碼

gitlab: use template

Nathalie Furmento 4 年之前
父節點
當前提交
b0c586c880
共有 1 個文件被更改,包括 10 次插入8 次删除
  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