CI: remove cve.yml and NVDCVE_API_KEY
PATCH 1/4 CI: remove cve.yml and NVDCVE_API_KEY
This yml fragment wasn't actually used by our CI, and the cve-check class no longer exists.
Signed-off-by Ross Burton <[email protected]>
--- .gitlab-ci.yml | 2 -- ci/cve.yml | 20 -------------------- 2 files changed, 22 deletions(-) delete mode 100644 ci/cve.yml
.gitlab-ci.yml +0 -2
@@ -15,8 +15,6 @@ variables: MIRROR_GHCR: ghcr.io # The list of extra Kas fragments to be used when building EXTRA_KAS_FILES: "" - # The NVD API key to use when fetching CVEs - NVDCVE_API_KEY: "" stages: - prep
ci/cve.yml deleted +0 -20
@@ -1,20 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/master/kas/schema-kas.json - -header: - version: 14 - -local_conf_header: - cve: | - INHERIT += "cve-check" - - # Allow the runner environment to provide an API key - NVDCVE_API_KEY = "${@d.getVar('BB_ORIGENV').getVar('NVDCVE_API_KEY') or ''}" - - # Just show the warnings for our layers - CVE_CHECK_SHOW_WARNINGS = "0" - CVE_CHECK_SHOW_WARNINGS:layer-arm-toolchain = "1" - CVE_CHECK_SHOW_WARNINGS:layer-meta-arm = "1" - CVE_CHECK_SHOW_WARNINGS:layer-meta-arm-bsp = "1" - - # Ignore the kernel, we sometime carry kernels in meta-arm - CVE_CHECK_SHOW_WARNINGS:pn-linux-yocto = "0"
Signature · 1 line
2.43.0
PATCH 2/4 CI: default CACHE_DIR to CI_PROJECT_DIR
Set the default cache directory to be the build tree so we don't assume anything about the runner environment by default.
After this change, runners that don't set CACHE_DIR will need to set it explicltly in their variables.
Signed-off-by Ross Burton <[email protected]>
--- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
.gitlab-ci.yml +4 -2
@@ -9,8 +9,10 @@ variables: CPU_REQUEST: "" # The default machine tag for the build jobs DEFAULT_TAG: "" - # The directory to use as the persistent cache (the root for DL_DIR, SSTATE_DIR, etc) - CACHE_DIR: $CI_BUILDS_DIR/persist + # The directory to use as the persistent cache (the root for DL_DIR, + # SSTATE_DIR, etc). The default is the build tree which will not be + # persistent, so this should be set in the runner. + CACHE_DIR: $CI_PROJECT_DIR # The container mirror to use MIRROR_GHCR: ghcr.io # The list of extra Kas fragments to be used when building
Signature · 1 line
2.43.0
PATCH 3/4 CI: use a single multiline script statement in .build
In reply to Ross BurtonNo change to the script, just formatting.
Signed-off-by Ross Burton <[email protected]>
--- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
.gitlab-ci.yml +7 -7
@@ -61,13 +61,13 @@ stages: # Catch all for everything else - if: '$KERNEL != "linux-yocto-dev"' script: - - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME" $EXTRA_KAS_FILES):lockfile.yml - - echo KASFILES=$KASFILES - - kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES - - kas build $KASFILES - - ./ci/check-warnings $KAS_BUILD_DIR/warnings.log - - kas shell ci/base.yml:lockfile.yml --command "$CI_PROJECT_DIR/ci/junit.sh $KAS_WORK_DIR/build" - + - | + KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME" $EXTRA_KAS_FILES):lockfile.yml + echo KASFILES=$KASFILES + kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES + kas build $KASFILES + ./ci/check-warnings $KAS_BUILD_DIR/warnings.log + kas shell ci/base.yml:lockfile.yml --command "$CI_PROJECT_DIR/ci/junit.sh $KAS_WORK_DIR/build" artifacts: name: "logs" when: on_failure
Signature · 1 line
2.43.0
PATCH 4/4 CI: add option to control whether warnings should be fatal or not
In reply to Ross BurtonWarnings 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 <[email protected]>
--- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
.gitlab-ci.yml +5 -1
@@ -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"
Signature · 1 line
2.43.0