mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 14:11:07 +02:00
ci-automation: Publish torcx_output_root to bincache
`build_image` depends on accesss to the torcx manifest and the "content addressable nature" of the directory. We currently rely on the torcx output root structure being preserved in the container image. While we're moving the torcx output root out of the container image, preserve its contents so that they can be restored from bincache.
This commit is contained in:
parent
6ebbe5f2b9
commit
1fc599f33c
@ -84,11 +84,17 @@ function _image_build_impl() {
|
||||
official_arg="--noofficial"
|
||||
fi
|
||||
|
||||
local torcx_root_tar="torcx_root.tar.zst"
|
||||
apply_local_patches
|
||||
copy_from_buildcache "images/${arch}/${vernum}/torcx/${torcx_root_tar}" .
|
||||
|
||||
# build image and related artifacts
|
||||
./run_sdk_container -x ./ci-cleanup.sh -n "${image_container}" -C "${packages_image}" \
|
||||
-v "${vernum}" \
|
||||
mkdir -p "${CONTAINER_IMAGE_ROOT}"
|
||||
mkdir -p "${CONTAINER_IMAGE_ROOT}" "${CONTAINER_TORCX_ROOT}"
|
||||
./run_sdk_container -n "${image_container}" -C "${packages_image}" \
|
||||
-v "${vernum}" \
|
||||
tar --zstd -xf "${torcx_root_tar}" -C "${CONTAINER_TORCX_ROOT}"
|
||||
./run_sdk_container -n "${image_container}" -C "${packages_image}" \
|
||||
-v "${vernum}" \
|
||||
./set_official --board="${arch}-usr" "${official_arg}"
|
||||
|
@ -123,6 +123,11 @@ function _packages_build_impl() {
|
||||
# generate image + push to build cache
|
||||
docker_commit_to_buildcache "${packages_container}" "${packages_image}" "${docker_vernum}"
|
||||
|
||||
# publish torcx output root for consumption by build_image
|
||||
local torcx_root_tar="torcx_root.tar.zst"
|
||||
tar --zstd -cpf "${torcx_root_tar}" -C "${torcx_tmp}/torcx" .
|
||||
copy_to_buildcache "images/${arch}/${vernum}/torcx" "${torcx_root_tar}"
|
||||
|
||||
# Publish torcx manifest and docker tarball to "images" cache so tests can pull it later.
|
||||
create_digests "${SIGNER}" \
|
||||
"${torcx_tmp}/torcx/${arch}-usr/latest/torcx_manifest.json" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user