diff --git a/ci-automation/image.sh b/ci-automation/image.sh index f45b78eaac..92e9a22cd5 100644 --- a/ci-automation/image.sh +++ b/ci-automation/image.sh @@ -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}" diff --git a/ci-automation/packages.sh b/ci-automation/packages.sh index add6fc3c61..1d4faf42c8 100644 --- a/ci-automation/packages.sh +++ b/ci-automation/packages.sh @@ -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" \