Build matrix in CI#
We currently build a variety of recipes for different purposes. The exact number of targets depends on the repositories used by the current manifest.
For this reason a tool can be found at scotty/scripts to specify the exactly needed matrix.
The tool itself takes 2 inputs:
the mode the matrix should be created for (build or documentation)
one or more paths to repositories used by the current manifest
Note
The list of currently used repositories by the manifest can be obtained with following scotty command
scotty info layers
e.g. the build matrix can be obtained by running
$ scotty-dynamic-matrix build $(scotty info layers)
documentation matrix would be then
$ scotty-dynamic-matrix documentation $(scotty info layers)
Available configurations#
The following keys can be altered
key |
type |
description |
default value |
---|---|---|---|
archive-images |
space separated list |
list of images to archive |
{build-images} |
build-dir |
path |
the build directory used |
build_{buildname} |
build-images |
space separated list |
list of bitbake targets to build |
|
build-map-images |
space separated list |
list of images to be exposed for scotty-test |
{build-images} |
build-sdk-images |
space separated list |
list of SDK targets to build |
{build-images} |
buildname |
string |
name of the build |
build-{environment.MACHINE}-{environment.DISTRO}-{environment.SCOTTY_FEATURE_LAYERS} |
do-archive |
0 = no, 1 = yes |
archive SBOMs and other artifacts |
1 |
do-build-images |
0 = no, 1 = yes |
build images |
0 |
do-build-sdk |
0 = no, 1 = yes |
build SDKs |
0 |
do-build-simpleswitch |
0 = no, 1 = yes |
build simpleswitch |
0 |
do-create-bundle |
0 = no, 1 = yes |
create qemu bundles |
0 |
do-downstream-jobs |
0 = no, 1 = yes |
run downstream jobs, like SDK docker updates |
0 |
do-export-tests |
0 = no, 1 = yes |
export test files |
0 |
do-run-tests |
0 = no, 1 = yes |
run automated tests |
0 |
do-testreport |
0 = no, 1 = yes |
create a test report |
0 |
libvirt-bundles |
space separated list |
names of qemu bundles |
|
test-images |
space separated list |
list of images to test |
{build-images} |
environment.ACCEPT_FSL_EULA |
0 = no, 1 = yes |
accept the NPX EULA |
0 |
environment.DISTRO |
string |
name of the DISTRO to use |
simplecore |
environment.LICENSE_FLAGS_ACCEPTED |
space separated list |
accepted license flags |
|
environment.MACHINE |
string |
MACHINE to use |
|
environment.SCOTTY_EXTRA_CONF |
‘;’ separated list |
extra config for scotty [1] |
|
environment.SCOTTY_EXTRA_DOWNLOAD |
space separated list |
extra downloads for scotty [1] |
|
environment.SCOTTY_EXTRA_ENV |
‘;’ separated list |
extra variables from environment for scotty [1] |
|
environment.SCOTTY_FEATURE_LAYERS |
space separated list |
selected features for scotty [1] |
Inline expansion#
You can also reference other items of the key-value mapping within the build description. These are then automatically expanded.
Example
"my-build": {
"A": "1",
"B": "{A}-2"
},
will become
"my-build": {
"A": "1",
"B": "1-2"
},
The different configuration files#
To control every aspect of your CI based software lifecycle, we need
different scotty-dynamic-matrix
configuration files