Skip to contentSkip to conversation

CI: Add BUILD_ENABLE_REGEX option to conditionally enable builds

PATCH Applied Peter Hoyes 2 participants 2 messages Feb 24, 2023 – Feb 25, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CI: Add BUILD_ENABLE_REGEX option to conditionally enable builds

From: Peter Hoyes <[email protected]>

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.

---
 .gitlab-ci.yml | 3 +++
 1 file changed, 3 insertions(+)
.gitlab-ci.yml +3 -0
index 2b5822ef..75d36094 100644
@@ -42,6 +42,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 dump --update --force-checkout --resolve-refs --resolve-env $KASFILES 
Signature · 1 line
2.34.1
Applied
#1 lore raw
Quoted 7 lines · Peter Hoyes

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.

Applied, thanks!

[1/1] CI: Add BUILD_ENABLE_REGEX option to conditionally enable builds

      commit: d5c024f1f5326fb19de33928acea34df4b58e9ba

Best regards,

Signature · 1 line
Jon Mason <[email protected]>