From 54e8f0079566fa5ba76c8b594508319e8b43d501 Mon Sep 17 00:00:00 2001 From: Peter Hoyes Date: Fri, 24 Feb 2023 12:06:06 +0000 Subject: [PATCH] CI: Add BUILD_ENABLE_REGEX option to conditionally enable builds Mirrors of meta-arm may focus their development on a small subset of MACHINEs so provide the option to restrict the boards that are built on CI using the variable BUILD_ENABLE_REGEX. If set, it conditionally enables builds; if unset there is no change in behavior. This variable could be overridden in a scheduled build, to e.g. build all the MACHINEs weekly. Signed-off-by: Peter Hoyes Signed-off-by: Jon Mason --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5aef513..8312578e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,6 +43,9 @@ stages: extends: .setup variables: KUBERNETES_CPU_REQUEST: $CPU_REQUEST + only: + variables: + - $BUILD_ENABLE_REGEX == null || $CI_JOB_NAME =~ $BUILD_ENABLE_REGEX script: - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME") - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'