[help.gnome.org: 10/14] ci: Consolidate jobs into a template




commit 8e275b5e74cfcf53a0a0f315ac80dd4da7ca6de4
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Sep 28 21:29:01 2021 +0100

    ci: Consolidate jobs into a template
    
    We only want to change some details and options between the C locale and
    the full rebuild jobs, so there's no point in copy-pasting the same
    script rules between them, when we can use `extends`.

 .gitlab-ci.yml | 37 +++++++++++++++----------------------
 1 file changed, 15 insertions(+), 22 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f6bfb89..19350a3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,8 +9,19 @@ stages:
     - dnf install -y python3 python3-pip python3-wheel 
     - dnf install -y ${FEDORA_DEPS}
     - pip3 install --user ${PIP_DEPS}
+  script:
+    - mkdir -p __pintail__ && cd __pintail__
+    - git clone --depth=1 https://github.com/projectmallard/pintail.git
+    - cd pintail && pip3 install --user -e . && cd ..
+    - git clone --depth=1 https://github.com/projectmallard/mallard-ducktype.git
+    - cd mallard-ducktype && pip3 install --user -e . && cd ..
+    - git clone --depth=1 https://github.com/projectmallard/pintail-itstool.git
+    - cd pintail-itstool && pip3 install --user -e . && cd ..
+    - cd ..
+    - pintail build -v --local ${PINTAIL_OPTS}
+    - mv __pintail__/build ${OUTPUT_DIR}
 
-help-web-en:
+help-web-C:
   stage: build
   extends: .build-fedora
   needs: []
@@ -27,16 +38,8 @@ help-web-en:
     PIP_DEPS:
       lxml
       pyyaml
-  timeout: 6h
-  script:
-    - mkdir -p __pintail__ && cd __pintail__
-    - git clone --depth=1 https://github.com/projectmallard/pintail.git
-    - cd pintail && pip3 install --user -e . && cd ..
-    - git clone --depth=1 https://github.com/projectmallard/mallard-ducktype.git
-    - cd mallard-ducktype && pip3 install --user -e . && cd ..
-    - cd ..
-    - pintail build -v --local --no-translation
-    - mv __pintail__/build help-web-C
+    PINTAIL_OPTS: "--no-translation"
+    OUTPUT_DIR: help-web-C
   artifacts:
     when: always
     paths:
@@ -59,18 +62,8 @@ help-web-full:
     PIP_DEPS:
       lxml
       pyyaml
+    OUTPUT_DIR: help-web-full
   timeout: 6h
-  script:
-    - mkdir -p __pintail__ && cd __pintail__
-    - git clone --depth=1 https://github.com/projectmallard/pintail.git
-    - cd pintail && pip3 install --user -e . && cd ..
-    - git clone --depth=1 https://github.com/projectmallard/mallard-ducktype.git
-    - cd mallard-ducktype && pip3 install --user -e . && cd ..
-    - git clone --depth=1 https://github.com/projectmallard/pintail-itstool.git
-    - cd pintail-itstool && pip3 install --user -e . && cd ..
-    - cd ..
-    - pintail build -v --local
-    - mv __pintail__/build help-web
   artifacts:
     when: always
     paths:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]