Commit 322bf2b8 authored by Benjamin Tissoires's avatar Benjamin Tissoires
Browse files

Do not push a second tag per image



We now embed the job, pipeline, project, commit in the labels of the
image, there is no point creating a (buggy) second tag and waste bandwidth
(because the second buildah commit now creates and entire new layer)
Signed-off-by: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@gmail.com>
parent 1f82c62c
......@@ -295,8 +295,6 @@
# tag the current container
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
- export JOB_TAG="${DISTRO_TAG}-built-by-job-${CI_JOB_ID}"
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# clean up the working container
- buildah rm $buildcntr
......@@ -304,11 +302,6 @@
# push the container image to the registry
# There is a bug when pushing 2 tags in the same repo with the same base:
# this may fail. Just retry it after.
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# Push the final tag
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
......
......@@ -262,8 +262,6 @@
# tag the current container
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
- export JOB_TAG="${DISTRO_TAG}-built-by-job-${CI_JOB_ID}"
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# clean up the working container
- buildah rm $buildcntr
......@@ -271,11 +269,6 @@
# push the container image to the registry
# There is a bug when pushing 2 tags in the same repo with the same base:
# this may fail. Just retry it after.
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# Push the final tag
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
......
......@@ -262,8 +262,6 @@
# tag the current container
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
- export JOB_TAG="${DISTRO_TAG}-built-by-job-${CI_JOB_ID}"
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# clean up the working container
- buildah rm $buildcntr
......@@ -271,11 +269,6 @@
# push the container image to the registry
# There is a bug when pushing 2 tags in the same repo with the same base:
# this may fail. Just retry it after.
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# Push the final tag
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
......
......@@ -267,8 +267,6 @@
# tag the current container
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
- export JOB_TAG="${DISTRO_TAG}-built-by-job-${CI_JOB_ID}"
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# clean up the working container
- buildah rm $buildcntr
......@@ -276,11 +274,6 @@
# push the container image to the registry
# There is a bug when pushing 2 tags in the same repo with the same base:
# this may fail. Just retry it after.
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# Push the final tag
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
......
......@@ -277,8 +277,6 @@
# tag the current container
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
- export JOB_TAG="${DISTRO_TAG}-built-by-job-${CI_JOB_ID}"
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# clean up the working container
- buildah rm $buildcntr
......@@ -286,11 +284,6 @@
# push the container image to the registry
# There is a bug when pushing 2 tags in the same repo with the same base:
# this may fail. Just retry it after.
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# Push the final tag
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
......
......@@ -267,8 +267,6 @@
# tag the current container
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
- export JOB_TAG="${DISTRO_TAG}-built-by-job-${CI_JOB_ID}"
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# clean up the working container
- buildah rm $buildcntr
......@@ -276,11 +274,6 @@
# push the container image to the registry
# There is a bug when pushing 2 tags in the same repo with the same base:
# this may fail. Just retry it after.
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# Push the final tag
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
......
......@@ -276,8 +276,6 @@
# tag the current container
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
- export JOB_TAG="${DISTRO_TAG}-built-by-job-${CI_JOB_ID}"
- $BUILDAH_COMMIT $buildcntr $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# clean up the working container
- buildah rm $buildcntr
......@@ -285,11 +283,6 @@
# push the container image to the registry
# There is a bug when pushing 2 tags in the same repo with the same base:
# this may fail. Just retry it after.
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$JOB_TAG
# Push the final tag
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG || true
- sleep 2
- podman push $CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$DISTRO_TAG
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment