gitlab-ci: handle single defconfig in script
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 6 Sep 2020 20:12:25 +0000 (22:12 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 9 Sep 2020 07:25:49 +0000 (09:25 +0200)
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
support/misc/gitlab-ci.yml.in
support/scripts/generate-gitlab-ci-yml

index c6c4d35a0c86c1bd439b50c2097fff5e4199746e..8a94b872f33339d55f27ca72a132f814dc7001cc 100644 (file)
@@ -64,20 +64,9 @@ check-package:
             - output/build/packages-file-list.txt
             - output/build/*/.config
             - runtime-test.log
-
-.defconfig:
-    extends: .defconfig_base
     before_script:
         - DEFCONFIG_NAME=${CI_JOB_NAME}
 
-one-defconfig:
-    extends: .defconfig_base
-    rules:
-        # For the branch or tag name named *-*_defconfigs, create a pipeline.
-        - if: '$CI_COMMIT_REF_NAME =~ /^.*-.*_defconfig$/'
-    before_script:
-        - DEFCONFIG_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')
-
 .runtime_test_base:
     # Keep build directories so the rootfs can be an artifact of the job. The
     # runner will clean up those files for us.
index 21963b29758052f4aec83c127c904382b3948033..39e0fc7283cad59039435b738ba59b0f1936356f 100755 (executable)
@@ -40,7 +40,13 @@ gen_defconfigs() {
     fi
     case "${CI_COMMIT_REF_NAME}" in
         # For the branch or tag name named *-defconfigs, create a pipeline.
-        (*-defconfigs) build_defconfigs=true;;
+        (*-defconfigs)
+            build_defconfigs=true
+        ;;
+        (*-*_defconfig)
+            defconfigs=( "${CI_COMMIT_REF_NAME##*-}" )
+            build_defconfigs=true
+        ;;
     esac
 
     for cfg in "${defconfigs[@]}"; do