From fe60f0804e179e785a5cecf973a157b6c045a10f Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 16 Jun 2026 16:51:10 +0100 Subject: [PATCH] CI: add option to control whether warnings should be fatal or not 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 --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b285698f..5059699e 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"