Browse Source

gitlab-ci: handle single defconfig in script

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>
Yann E. MORIN 4 years ago
parent
commit
386f2c620b
2 changed files with 7 additions and 12 deletions
  1. 0 11
      support/misc/gitlab-ci.yml.in
  2. 7 1
      support/scripts/generate-gitlab-ci-yml

+ 0 - 11
support/misc/gitlab-ci.yml.in

@@ -64,20 +64,9 @@ check-package:
             - output/build/packages-file-list.txt
             - output/build/packages-file-list.txt
             - output/build/*/.config
             - output/build/*/.config
             - runtime-test.log
             - runtime-test.log
-
-.defconfig:
-    extends: .defconfig_base
     before_script:
     before_script:
         - DEFCONFIG_NAME=${CI_JOB_NAME}
         - 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:
 .runtime_test_base:
     # Keep build directories so the rootfs can be an artifact of the job. The
     # Keep build directories so the rootfs can be an artifact of the job. The
     # runner will clean up those files for us.
     # runner will clean up those files for us.

+ 7 - 1
support/scripts/generate-gitlab-ci-yml

@@ -40,7 +40,13 @@ gen_defconfigs() {
     fi
     fi
     case "${CI_COMMIT_REF_NAME}" in
     case "${CI_COMMIT_REF_NAME}" in
         # For the branch or tag name named *-defconfigs, create a pipeline.
         # 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
     esac
 
 
     for cfg in "${defconfigs[@]}"; do
     for cfg in "${defconfigs[@]}"; do