mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-13 13:46:46 +00:00
ci: cache: Also store the ${component} sha256sum
This is something that was done by our Jenkins jobs, but that I ended up missing when writingd0c257b3a7
. Now, let's also add the sha256sum to the cached artefact, and in a coming up PR (after this one is merged) we will also start checking for that. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com> (cherry picked from commit4533a7a416
)
This commit is contained in:
parent
b5da4ce0d8
commit
e464bbfc93
@ -710,8 +710,10 @@ handle_build() {
|
||||
fi
|
||||
tar tvf "${final_tarball_path}"
|
||||
|
||||
echo "${latest_artefact}" > ${workdir}/${build_target}-version
|
||||
echo "${latest_builder_image}" > ${workdir}/${build_target}-builder-image-version
|
||||
pushd ${workdir}
|
||||
echo "${latest_artefact}" > ${build_target}-version
|
||||
echo "${latest_builder_image}" > ${build_target}-builder-image-version
|
||||
sha256sum "${final_tarball_name}" > ${build_target}-sha256sum
|
||||
|
||||
if [ "${PUSH_TO_REGISTRY}" = "yes" ]; then
|
||||
if [ -z "${ARTEFACT_REGISTRY}" ] ||
|
||||
@ -721,13 +723,13 @@ handle_build() {
|
||||
die "ARTEFACT_REGISTRY, ARTEFACT_REGISTRY_USERNAME, ARTEFACT_REGISTRY_PASSWORD and TARGET_BRANCH must be passed to the script when pushing the artefacts to the registry!"
|
||||
fi
|
||||
|
||||
pushd ${workdir}
|
||||
echo "${ARTEFACT_REGISTRY_PASSWORD}" | oras login "${ARTEFACT_REGISTRY}" -u "${ARTEFACT_REGISTRY_USERNAME}" --password-stdin
|
||||
|
||||
oras push ${ARTEFACT_REGISTRY}/kata-containers/cached-artefacts/${build_target}:latest-${TARGET_BRANCH}-$(uname -m) ${final_tarball_name} ${build_target}-version ${build_target}-builder-image-version
|
||||
oras push ${ARTEFACT_REGISTRY}/kata-containers/cached-artefacts/${build_target}:latest-${TARGET_BRANCH}-$(uname -m) ${final_tarball_name} ${build_target}-version ${build_target}-builder-image-version ${build_target}-sha256sum
|
||||
oras logout "${ARTEFACT_REGISTRY}"
|
||||
popd
|
||||
fi
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
silent_mode_error_trap() {
|
||||
|
Loading…
Reference in New Issue
Block a user