diff options
author | Rémy Coutable <remy@rymai.me> | 2019-03-12 12:40:05 +0000 |
---|---|---|
committer | Balasankar "Balu" C <balasankar@gitlab.com> | 2019-04-12 10:12:05 +0530 |
commit | 1492204c03eac6e3db055453e2f25f8d62e9be2a (patch) | |
tree | eed61e37c2ecf26902e3c947c2d8bdd2525c57f1 | |
parent | 5f96ebc4856e0dcc10ff4cc08cf9d4fc41c53631 (diff) | |
download | gitlab-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
-rwxr-xr-x | scripts/build_assets_image | 6 | ||||
-rwxr-xr-x | scripts/trigger-build | 2 |
2 files changed, 7 insertions, 1 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 diff --git a/scripts/trigger-build b/scripts/trigger-build index 9dbafffddfc..9c5fc3c76a5 100755 --- a/scripts/trigger-build +++ b/scripts/trigger-build @@ -141,7 +141,7 @@ module Trigger "GITLAB_#{edition}_VERSION" => ENV['CI_COMMIT_REF_NAME'], "GITLAB_VERSION" => ENV['CI_COMMIT_REF_NAME'], "GITLAB_TAG" => ENV['CI_COMMIT_TAG'], - "GITLAB_ASSETS_TAG" => ENV['CI_COMMIT_REF_SLUG'], + "GITLAB_ASSETS_TAG" => ENV['CI_COMMIT_TAG'] ? ENV['CI_COMMIT_REF_NAME'] : ENV['CI_COMMIT_REF_SLUG'], "#{edition}_PIPELINE" => 'true' } end |