Re-order tagging and tag cleanup
This commit is contained in:
parent
1eee414360
commit
0ca32aa2ae
@ -44,6 +44,7 @@ PODMAN_BUILD_ARGS=(
|
|||||||
--platform "${OCI_ARCH}"
|
--platform "${OCI_ARCH}"
|
||||||
# Tag the generated image.
|
# Tag the generated image.
|
||||||
-t "${IMAGE_TAG}"
|
-t "${IMAGE_TAG}"
|
||||||
|
-t "latest"
|
||||||
# Label the image.
|
# Label the image.
|
||||||
--label="gentoo-nfr-${IMAGE_TAG}"
|
--label="gentoo-nfr-${IMAGE_TAG}"
|
||||||
# Sign the image.
|
# Sign the image.
|
||||||
@ -72,14 +73,11 @@ _mkdir "${LOGDIR}"
|
|||||||
# === Fetch the base image.
|
# === Fetch the base image.
|
||||||
podman pull gentoo/stage3:amd64-nomultilib-systemd || exit_err "Could not fetch the image."
|
podman pull gentoo/stage3:amd64-nomultilib-systemd || exit_err "Could not fetch the image."
|
||||||
|
|
||||||
# === Build the new image.
|
|
||||||
podman build "${PODMAN_BUILD_ARGS[@]}" || exit_err "Build failed."
|
|
||||||
|
|
||||||
# === Remove the old tag 'latest'.
|
# === Remove the old tag 'latest'.
|
||||||
podman tag rm "${REGISTRY}:latest" # Do not exit_err here. At least on first run
|
podman tag rm "${REGISTRY}:latest" # Do not exit_err here. At least on first run
|
||||||
# there is no latest tag to delete.
|
# there is no latest tag to delete.
|
||||||
|
|
||||||
# === Tage the new image as 'latest'.
|
# === Build the new image.
|
||||||
podman tag "${REGISTRY}:${VERSION}" "${REGISTRY}:latest" || exit_err "Could not tag new image as 'latest'."
|
podman build "${PODMAN_BUILD_ARGS[@]}" || exit_err "Build failed."
|
||||||
|
|
||||||
# vim:fileencoding=utf-8:ts=4:syntax=bash:expandtab
|
# vim:fileencoding=utf-8:ts=4:syntax=bash:expandtab
|
||||||
|
Reference in New Issue
Block a user