Skip to content
Snippets Groups Projects
Unverified Commit 73790784 authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Simplify image builds, tag each pipeline run separately


To make it easier to reproduce a setup or roll back to a previous
state, tag each pipeline run with a unique tag of its own in the
addition to a per-branch tag.

Signed-off-by: default avatarAndrej Shadura <andrew.shadura@collabora.co.uk>
parent aea3bd37
No related branches found
No related tags found
1 merge request!49Simplify image builds, tag each pipeline run separately
Pipeline #553002 passed
......@@ -41,8 +41,8 @@ codestyle:
docker:
stage: docker
variables:
FULL_IMAGE_TAG: $CI_REGISTRY_IMAGE/obs-proxy:$CI_COMMIT_REF_SLUG
MANIFEST_NAME: obs-proxy
IMAGE_TAG: $CI_REGISTRY_IMAGE/obs-proxy:$CI_COMMIT_REF_SLUG
IMAGE_BUILD_TAG: $CI_REGISTRY_IMAGE/obs-proxy:$CI_COMMIT_SHORT_SHA-P$CI_PIPELINE_ID
DEBIAN_FRONTEND: noninteractive
BUILDAH_ISOLATION: chroot
image:
......@@ -54,12 +54,9 @@ docker:
- update-binfmts --enable qemu-aarch64
script:
- buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- buildah manifest create ${MANIFEST_NAME}
- >
buildah bud --tag "${FULL_IMAGE_TAG}"
--manifest ${MANIFEST_NAME}
--arch arm64
- >
buildah bud --tag "${FULL_IMAGE_TAG}"
--manifest ${MANIFEST_NAME}
- buildah manifest push --format=v2s2 --all ${MANIFEST_NAME} docker://${FULL_IMAGE_TAG}
- buildah build --manifest ${IMAGE_BUILD_TAG} --platform linux/amd64,linux/arm64
- buildah manifest push --format=v2s2 --all ${IMAGE_BUILD_TAG} docker://${IMAGE_BUILD_TAG}
- echo "Pushed image ${IMAGE_BUILD_TAG}"
- buildah tag ${IMAGE_BUILD_TAG} ${IMAGE_TAG}
- buildah manifest push --format=v2s2 --all ${IMAGE_TAG} docker://${IMAGE_TAG}
- echo "Pushed image ${IMAGE_TAG}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment