summaryrefslogtreecommitdiff
path: root/scripts/build_assets_image
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-03-12 12:40:05 +0000
committerBalasankar "Balu" C <balasankar@gitlab.com>2019-04-12 10:12:05 +0530
commit1492204c03eac6e3db055453e2f25f8d62e9be2a (patch)
treeeed61e37c2ecf26902e3c947c2d8bdd2525c57f1 /scripts/build_assets_image
parent5f96ebc4856e0dcc10ff4cc08cf9d4fc41c53631 (diff)
downloadgitlab-ce-1492204c03eac6e3db055453e2f25f8d62e9be2a.tar.gz
Merge branch 'tag-pipeline-asset-image' into 'master'asset-tag-fix-11-9
Tag asset docker image with GitLab version also See merge request gitlab-org/gitlab-ce!26029
Diffstat (limited to 'scripts/build_assets_image')
-rwxr-xr-xscripts/build_assets_image6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/build_assets_image b/scripts/build_assets_image
index ad5342fe3a1..25b6060b6c4 100755
--- a/scripts/build_assets_image
+++ b/scripts/build_assets_image
@@ -24,3 +24,9 @@ docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
docker push ${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_SLUG}
docker push ${ASSETS_IMAGE_PATH}:${CI_COMMIT_SHA}
+# Also tag the image with GitLab version, if running on a tag pipeline, so
+# other projects can simply use that instead of computing the slug.
+if [ -n "$CI_COMMIT_TAG" ]; then
+ docker tag ${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_SLUG} ${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_NAME}
+ docker push ${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_NAME}
+fi