mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-01-11 15:00:39 +00:00
CI: support extra kas files from environment
Extend jobs-to-kas so the first argument is still the GitLab job name, but allow further arguments to specify extra Kas files to use in addition. Then add a variable EXTRA_KAS_FILES to the CI configuration that defaults to the empty string and pass this to jobs-to-kas. This lets specific pipeline runs add extra Kas files, for example to use experimental branches or enable extra features without touching the CI directly. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -11,6 +11,7 @@ variables:
|
||||
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 0
|
||||
ACS_TEST: 0
|
||||
ACS_TAG: ""
|
||||
EXTRA_KAS_FILES: ""
|
||||
|
||||
stages:
|
||||
- prep
|
||||
@@ -61,7 +62,7 @@ stages:
|
||||
# Catch all for everything else
|
||||
- if: '$KERNEL != "linux-yocto-dev"'
|
||||
script:
|
||||
- KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME"):lockfile.yml
|
||||
- KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME" $EXTRA_KAS_FILES):lockfile.yml
|
||||
- kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES
|
||||
- kas build $KASFILES
|
||||
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
|
||||
|
||||
@@ -6,14 +6,25 @@
|
||||
# corstone1000-mps3
|
||||
# fvp-base: [testimage]
|
||||
# qemuarm64-secureboot: [clang, glibc, testimage]
|
||||
# This argument should be quoted to avoid expansion and to be handled
|
||||
# as a single value.
|
||||
#
|
||||
# Any further arguments will be handled as further yml file basenames.
|
||||
#
|
||||
# Turn this list into a series of yml files separated by colons to pass to kas
|
||||
|
||||
set -e -u
|
||||
|
||||
FILES="ci/$(echo $1 | cut -d ':' -f 1).yml"
|
||||
# First, parse the GitLab CI job name (CI_JOB_NAME via $1) and accumulate a list
|
||||
# of Kas files.
|
||||
JOBNAME="$1"
|
||||
shift
|
||||
|
||||
for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
|
||||
# The base name of the job
|
||||
FILES="ci/$(echo $JOBNAME | cut -d ':' -f 1).yml"
|
||||
|
||||
# The list of matrix variations
|
||||
for i in $(echo $JOBNAME | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
|
||||
# Given that there are no yml files for gcc or glibc, as those are the
|
||||
# defaults, we can simply ignore those parameters. They are necessary
|
||||
# to pass in so that matrix can correctly setup all of the permutations
|
||||
@@ -24,4 +35,9 @@ for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
|
||||
FILES+=":ci/$i.yml"
|
||||
done
|
||||
|
||||
# Now pick up any further names
|
||||
for i in $*; do
|
||||
FILES+=":ci/$i.yml"
|
||||
done
|
||||
|
||||
echo $FILES
|
||||
|
||||
Reference in New Issue
Block a user