mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 04:04:45 +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 writing d0c257b3a7
.
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>
This commit is contained in:
parent
eccc76df63
commit
4533a7a416
@ -713,8 +713,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}" ] ||
|
||||
@ -724,13 +726,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
|
||||
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 logout "${ARTEFACT_REGISTRY}"
|
||||
popd
|
||||
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}"
|
||||
fi
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
silent_mode_error_trap() {
|
||||
|
Loading…
Reference in New Issue
Block a user