CI: prettify the include of templates
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Thu, 29 Jul 2021 16:50:57 +0000 (18:50 +0200)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 31 Aug 2022 23:38:46 +0000 (09:38 +1000)
Makes the resulting file easier to read

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
.gitlab-ci.yml
.gitlab-ci/ci.template

index 886874cbd24b7210b5d2c1ae258dad25f45a60bd..e1082bec91fde85157c2049a23d464c5309de1d3 100644 (file)
 .templates_sha: &template_sha 0c312d9c7255f46e741d43bcd1930f09cd12efe7
 
 include:
-  # Alpine container builder template
   - project: 'freedesktop/ci-templates'
     ref: *template_sha
-    file: '/templates/alpine.yml'
-  # Arch container builder template
-  - project: 'freedesktop/ci-templates'
-    ref: *template_sha
-    file: '/templates/arch.yml'
-  # Debian container builder template
-  - project: 'freedesktop/ci-templates'
-    ref: *template_sha
-    file: '/templates/debian.yml'
-  # Fedora container builder template
-  - project: 'freedesktop/ci-templates'
-    ref: *template_sha
-    file: '/templates/fedora.yml'
-  # Freebsd container builder template
-  - project: 'freedesktop/ci-templates'
-    ref: *template_sha
-    file: '/templates/freebsd.yml'
-  # Ubuntu container builder template
-  - project: 'freedesktop/ci-templates'
-    ref: *template_sha
-    file: '/templates/ubuntu.yml'
-  - project: 'freedesktop/ci-templates'
-    ref: *template_sha
-    file: '/templates/ci-fairy.yml'
+    file:
+      - '/templates/ci-fairy.yml'
+      # Alpine container builder template
+      - '/templates/alpine.yml'
+      # Arch container builder template
+      - '/templates/arch.yml'
+      # Debian container builder template
+      - '/templates/debian.yml'
+      # Fedora container builder template
+      - '/templates/fedora.yml'
+      # Freebsd container builder template
+      - '/templates/freebsd.yml'
+      # Ubuntu container builder template
+      - '/templates/ubuntu.yml'
 
 stages:
   - sanity check     # CI/commit checks
index d5725b9c95019ec819e0414db1ba81fc44402fe2..80387671d7147154b0e8dbeb0b20ace6a183a8be 100644 (file)
 .templates_sha: &template_sha 0c312d9c7255f46e741d43bcd1930f09cd12efe7
 
 include:
-  {% for distro in distributions|sort(attribute="name") %}
-  # {{ distro.name.capitalize() }} container builder template
   - project: 'freedesktop/ci-templates'
     ref: *template_sha
-    file: '/templates/{{distro.name}}.yml'
+    file:
+      - '/templates/ci-fairy.yml'
+  {% for distro in distributions|sort(attribute="name") %}
+      # {{ distro.name.capitalize() }} container builder template
+      - '/templates/{{distro.name}}.yml'
   {% endfor %}
-  - project: 'freedesktop/ci-templates'
-    ref: *template_sha
-    file: '/templates/ci-fairy.yml'
 
 stages:
   - sanity check     # CI/commit checks