Skip to content
Snippets Groups Projects
Verified Commit d5b19354 authored by Davide Gardenal's avatar Davide Gardenal
Browse files

.oniro-ci: add new Linux hidden job definition


build-linux-image, build-linux-oniro-image-base and
build-linux-oniro-image-tests are new linux hidden jobs that defines
the flavor to be Linux and set the recipe to build to oniro-image-base
and oniro-image-base-tests respectively.

linux-qemu-x86 and linux-seco-imx8mm-c61-2gb extends them. This is
the first iteration and in later commits all the jobs will be
migrated to the new structure.

This is giving us a more precise control over the artifacts upload,
especially with the gcc and clang split.

This commit is not breaking any of the jobs that are not using the
new definition.

Signed-off-by: Davide Gardenal's avatarDavide Gardenal <davide.gardenal@huawei.com>
parent f67b48a9
No related tags found
No related merge requests found
Pipeline #7010 passed
......@@ -258,7 +258,8 @@
.build-image:
extends: .build-recipe
variables:
CI_ONIRO_JOB_ARTIFACTS: ""
CI_ONIRO_JOB_ARTIFACTS: "*.wic.* *.bmap ovmf.qcow2"
CI_ONIRO_STORE_IMAGE_ARTIFACT: 0
script:
- !reference [.build-recipe, script]
# Move artifacts for recovery, which only considers $CI_PROJECT_DIR and
......@@ -276,11 +277,12 @@
# build and boot.
- find "$BITBAKE_DEPLOY_DIR"/images/ -name *.wic -exec rm -rf {} \;
- cp -a "$BITBAKE_DEPLOY_DIR"/licenses/ "$CI_PROJECT_DIR"/artifacts || true
# Only copy the files defined in the CI_ONIRO_JOB_ARTIFACTS variable. Most
# If CI_ONIRO_STORE_IMAGE_ARTIFACT is 1 copy the files defined in the CI_ONIRO_JOB_ARTIFACTS variable. Most
# of the remaining files are redundant and quite large.
- if test "$CI_ONIRO_STORE_IMAGE_ARTIFACT" != "1"; then (echo "CI_ONIRO_STORE_IMAGE_ARTIFACT is not set, artifacts will not be saved!") fi
- |
set -x
if test -n "$CI_ONIRO_JOB_ARTIFACTS" && test -d "$BITBAKE_DEPLOY_DIR"; then
if test -n "$CI_ONIRO_JOB_ARTIFACTS" && test -d "$BITBAKE_DEPLOY_DIR" && test "$CI_ONIRO_STORE_IMAGE_ARTIFACT" = "1"; then
(
cd "$BITBAKE_DEPLOY_DIR"
for artifact in $CI_ONIRO_JOB_ARTIFACTS; do
......@@ -302,9 +304,27 @@
variables:
CI_ONIRO_BB_LOCAL_CONF_plus_equals_INHERIT: create-spdx
CI_ONIRO_JOB_ARTIFACTS: "*.wic.* *.bmap"
CI_ONIRO_STORE_IMAGE_ARTIFACT: 1
script:
- !reference [.build-image, script]
.build-linux-image:
extends: .build-image
variables:
CI_ONIRO_BUILD_FLAVOUR: linux
CI_ONIRO_BB_LOCAL_CONF_plus_equals_INHERIT: rm_work
CI_ONIRO_BB_LOCAL_CONF_plus_equals_INHERIT: create-spdx
.build-linux-oniro-image-base:
extends: .build-linux-image
variables:
CI_ONIRO_RECIPE_NAME: oniro-image-base
.build-linux-oniro-image-tests:
extends: .build-linux-image
variables:
CI_ONIRO_RECIPE_NAME: oniro-image-base-tests
.build-rauc-bundle:
extends: .build-image
variables:
......
......@@ -32,23 +32,22 @@
allow_failure: true
.linux-qemu-x86:
extends: [.build-wic-image, .check-abi]
extends: [.build-linux-oniro-image-tests, .check-abi]
variables:
MACHINE: qemux86
CI_ONIRO_BUILD_FLAVOUR: linux
CI_ONIRO_RECIPE_NAME: oniro-image-base-tests
# Set CI_ONIRO_BUILD_CACHE to "pub", overriding the value defined in the
# .build job. This enables sharing of download and sstate-cache created
# during this job.
#
# This is done assuming that there are no non-redistributable or otherwise
# tainted build intermediate files, downloads or published artifacts.
CI_ONIRO_BB_LOCAL_CONF_BB_GENERATE_MIRROR_TARBALLS: 1
CI_ONIRO_JOB_ARTIFACTS: "*.wic.* *.bmap ovmf.qcow2"
CI_ONIRO_BUILD_CACHE: "pub"
linux-qemu-x86-gcc:
extends: [.linux-qemu-x86, .toolchain-gcc]
extends: [.linux-qemu-x86, .toolchain-gcc]
variables:
CI_ONIRO_STORE_IMAGE_ARTIFACT: 1 # artifacts used by lava-qemu-x86
linux-qemu-x86-clang:
extends: [.linux-qemu-x86, .toolchain-clang]
extends: [.linux-qemu-x86, .toolchain-clang]
.linux-qemu-x86_64:
extends: [.build-wic-image, .check-abi]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment