gitlab CI: make the custom build reference automated
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 4 Jan 2021 00:45:41 +0000 (10:45 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 4 Jan 2021 00:59:25 +0000 (10:59 +1000)
We still require Fedora for the various jobs with custom autotools/meson
configurations. But we might as well make it dependent on the config file
entries only than hardcoding it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci/ci.template

index db9fdf212312c08abb7a01f45cdff6e538f3e363..2a5ed7089e0de5ea4ed6ffa7df069c80f6ba6578 100644 (file)
@@ -311,12 +311,13 @@ fedora:32@qemu-forced-rebuild:
 #
 # We only run the build option combinations on one image
 # because they're supposed to fail equally on all
+{% set custom_build_distro = distributions|selectattr("name", "equalto", "fedora")|first() %}
 .fedora-custom-build@autotools-template:
   extends:
-    - .fedora:31
+    - .{{custom_build_distro.name}}:{{custom_build_distro.versions|first()}}
     - .autotools-build@template
   stage: build
-  needs: ['fedora:31@container-prep']
+  needs: ['{{custom_build_distro.name}}:{{custom_build_distro.versions|first()}}@container-prep']
 
 no-valgrind:autotools:
   extends: .fedora-custom-build@autotools-template
@@ -358,7 +359,7 @@ enable-gcov:autotools:
     - .fedora:31
     - .meson-build@template
   stage: build
-  needs: ['fedora:31@container-prep']
+  needs: ['{{custom_build_distro.name}}:{{custom_build_distro.versions|first()}}@container-prep']
 
 no-valgrind:meson:
   extends: .fedora-custom-build@meson-template
@@ -412,7 +413,7 @@ static-build:meson:
 
 soname:
   extends:
-    - .fedora:31
+    - .{{custom_build_distro.name}}:{{custom_build_distro.versions|first()}}
   stage: build
   script:
   - ./autogen.sh --prefix=$PWD/prefix-autotools/
@@ -421,7 +422,7 @@ soname:
   - meson "$MESON_BUILDDIR" --prefix=$PWD/prefix-meson/
   - ninja -C "$MESON_BUILDDIR" install
   - ls -l $PWD/prefix-meson/lib64/libevdev.so.2.3.0
-  needs: ['fedora:31@container-prep']
+  needs: ['{{custom_build_distro.name}}:{{custom_build_distro.versions|first()}}@container-prep']
 
 #################################################################
 #                                                               #