kas: now that linux-stable is unused, remove it from kas
PATCH 1/3 kas: now that linux-stable is unused, remove it from kas
Change-Id I263cf1658c6bfc774bcf7b9c24d164003e88f634
Signed-off-by Ross Burton <[email protected]>
--- kas/base.yml | 3 --- 1 file changed, 3 deletions(-)
kas/base.yml +0 -3
@@ -25,9 +25,6 @@ repos: layers: meta-oe: - meta-kernel: - url: https://gitlab.com/openembedded/community/meta-kernel.git - local_conf_header: base: | CONF_VERSION = "1"
Signature · 1 line
2.25.1
PATCH 2/3 ci: make bootstrap just another kas overlay
Simplify the gitlab-ci by having the bootstrap build as just another Kas overlay file, so there's no duplication of build script.
Change-Id I7341750d2ae7f3c146bfe323f61fa98c0f3121c0
Signed-off-by Ross Burton <[email protected]>
--- .gitlab-ci.yml | 6 +----- kas/bootstrap.yml | 9 +++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 kas/bootstrap.yml
.gitlab-ci.yml +1 -5
@@ -36,13 +36,9 @@ stages: # Build a number of native tools first to ensure the other builders don't race # over them -bootstrap: +n1sdp/bootstrap: extends: .build stage: bootstrap - variables: - KAS_TARGET: binutils-cross-aarch64 gcc-cross-aarch64 python3-native opkg-native rpm-native - script: - - kas build kas/n1sdp.yml # What percentage of machines in the layer do we build machine-coverage:
kas/bootstrap.yml new file +9 -0
@@ -0,0 +1,9 @@ +header: + version: 9 + +target: + - binutils-cross-aarch64 + - gcc-cross-aarch64 + - python3-native + - opkg-native + - rpm-native
Signature · 1 line
2.25.1
PATCH 3/3 ci: fail any build that emits warnings
In reply to Ross BurtonUsing a custom logging.yml we can instruct BitBake's logger to write all warnings and errors into a separate log file.
Then after the build has finished we can see if the log file is empty and if not show it and abort the build.
Change-Id Ida835b5c822941fb513dfb1758b4ec195e0050fc
Signed-off-by Ross Burton <[email protected]>
--- .gitlab-ci.yml | 2 ++ kas/base.yml | 3 +++ kas/check-warnings | 18 ++++++++++++++++++ kas/logging.yml | 13 +++++++++++++ 4 files changed, 36 insertions(+) create mode 100755 kas/check-warnings create mode 100644 kas/logging.yml
.gitlab-ci.yml +2 -0
@@ -15,6 +15,7 @@ stages: KAS_WORK_DIR: $CI_PROJECT_DIR/work SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate DL_DIR: $CI_BUILDS_DIR/persist/downloads + BB_LOGCONFIG: $CI_PROJECT_DIR/kas/logging.yml before_script: - echo KAS_WORK_DIR = $KAS_WORK_DIR - echo SSTATE_DIR = $SSTATE_DIR
@@ -28,6 +29,7 @@ stages: - KASFILES=$(kas/jobs-to-kas $CI_JOB_NAME) - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf' - kas build $KASFILES + - ./kas/check-warnings $KAS_WORK_DIR/build/warnings.log #
kas/base.yml +3 -0
@@ -25,6 +25,9 @@ repos: layers: meta-oe: +env: + BB_LOGCONFIG: "" + local_conf_header: base: | CONF_VERSION = "1"
kas/check-warnings new file +18 -0
@@ -0,0 +1,18 @@ +#! /bin/bash + +# Expects the path to a log file as $1, and if this file has any content +# then display the contents and exit with an error code. + +set -e -u + +LOGFILE=$1 + +if test -s $LOGFILE; then + echo ============================== + echo The build had warnings/errors: + echo ============================== + cat $LOGFILE + exit 1 +fi + +exit 0
kas/logging.yml new file +13 -0
@@ -0,0 +1,13 @@ +# Python logging configuration to write all warnings to a separate file +version: 1 + +handlers: + warnings: + class: logging.FileHandler + level: WARNING + filename: warnings.log + formatter: BitBake.logfileFormatter + +loggers: + BitBake: + handlers: [warnings]
Signature · 1 line
2.25.1