diff mbox series

[4/4] CI: add option to control whether warnings should be fatal or not

Message ID 20260617124333.437665-4-ross.burton@arm.com
State New
Headers show
Series [1/4] CI: remove cve.yml and NVDCVE_API_KEY | expand

Commit Message

Ross Burton June 17, 2026, 12:43 p.m. UTC
Warnings being always fatal is quite anti-social because sometimes there
are temporary warnings that we don't want to break the CI.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .gitlab-ci.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b285698f47..5059699ee5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,8 @@  variables:
   MIRROR_GHCR: ghcr.io
   # The list of extra Kas fragments to be used when building
   EXTRA_KAS_FILES: ""
+  # Whether warnings should be fatal (0/1)
+  FATAL_WARNINGS: 0
 
 stages:
   - prep
@@ -66,7 +68,9 @@  stages:
       echo KASFILES=$KASFILES
       kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES
       kas build $KASFILES
-      ./ci/check-warnings $KAS_BUILD_DIR/warnings.log
+      if [ $FATAL_WARNINGS -ne 0 ]; then
+        ./ci/check-warnings $KAS_BUILD_DIR/warnings.log
+      fi
       kas shell ci/base.yml:lockfile.yml --command "$CI_PROJECT_DIR/ci/junit.sh $KAS_WORK_DIR/build"
   artifacts:
     name: "logs"