Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-03-12 15:40:05 +0300
committerRémy Coutable <remy@rymai.me>2019-03-12 15:40:05 +0300
commitbc5576873517013baa4d04492bbc9e99bfa7859e (patch)
tree7bc328c153f6a96f6de750d4795b6eb017f2c2fe
parentd20eee85698820982ee7526ae3ff019c7fe850c0 (diff)
parent24426f37d7eb084f8dc68686249e3b3f0a0bb169 (diff)
Merge branch 'tag-pipeline-asset-image' into 'master'
Tag asset docker image with GitLab version also See merge request gitlab-org/gitlab-ce!26029
-rwxr-xr-xscripts/build_assets_image6
-rwxr-xr-xscripts/trigger-build2
2 files changed, 7 insertions, 1 deletions
diff --git a/scripts/build_assets_image b/scripts/build_assets_image
index 9afada244c8..b659bd751b2 100755
--- a/scripts/build_assets_image
+++ b/scripts/build_assets_image
@@ -27,3 +27,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