Skip to content
Snippets Groups Projects
Commit 882bbd76 authored by Emanuele Aina's avatar Emanuele Aina Committed by Martyn Welch
Browse files

gitlab-ci: Accept $BUILD_ID CI var to create additional tags


When triggering a pipeline, by setting the `BUILD_ID` CI variable it is
now possible to tell the pipeline to create `$IMAGE:$BUILD_ID` tags
like `v2022dev0-image-builder:20201225.000`.

With this it is possible to have an external orchestrator trigger all
the nightly pipelines with a shared build id, rather than have each
pipeline compute one at different times.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 4bedb273
No related branches found
No related tags found
2 merge requests!138gitlab-ci: Accept $BUILD_ID CI var to create additional tags,!93WIP: documentation-builder: Rebase on Apertis instead of Debian Buster
Pipeline #164844 passed
......@@ -84,6 +84,13 @@ build-base-rootfs:
- echo "Tagging ${TEST_TAG} as ${TAG} for ${IMAGE}"
- skopeo copy --src-creds "$AUTH" --dest-creds "$AUTH" docker://"${IMAGE}:${TEST_TAG}" docker://"${IMAGE}:${TAG}"
- echo "🏷️ Tagged ${IMAGE}:${TAG}"
- |
if [ -n "${BUILD_ID:-}" ]
then
echo "Tagging ${TEST_TAG} as ${BUILD_ID} for ${IMAGE}"
skopeo copy --src-creds "$AUTH" --dest-creds "$AUTH" docker://"${IMAGE}:${TEST_TAG}" docker://"${IMAGE}:${BUILD_ID}"
echo "🏷️ Tagged ${IMAGE}:${BUILD_ID}"
fi
build-base-docker-image:
extends: .build-docker-image
......
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