artifacts: don't keep deb-tar's .tar after uploading to OCI

- they won't ever be used after this, and just accumulate trash for no reason
This commit is contained in:
Ricardo Pardini 2023-07-28 13:21:19 +02:00 committed by Igor
parent c347e83fce
commit 6e5b8ffba0

View File

@ -364,6 +364,12 @@ function upload_artifact_to_oci() {
display_alert "Pushing to OCI" "'${artifact_final_file}' -> '${artifact_full_oci_target}'" "info"
oras_push_artifact_file "${artifact_full_oci_target}" "${artifact_final_file}" "${artifact_name} - ${artifact_version} - ${artifact_version_reason} - type: ${artifact_type}"
# If this is a deb-tar, delete the .tar after the upload. We won't ever need it again.
if [[ "${artifact_type}" == "deb-tar" ]]; then
display_alert "Deleting deb-tar after OCI deploy" "deb-tar: ${artifact_final_file_basename}" "warn" # @TODO
run_host_command_logged rm -fv "${artifact_final_file}"
fi
}
function is_artifact_available_in_local_cache() {