diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /scripts/build_assets_image | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'scripts/build_assets_image')
-rwxr-xr-x | scripts/build_assets_image | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/build_assets_image b/scripts/build_assets_image index 12beddfa184..e6a5f036fe5 100755 --- a/scripts/build_assets_image +++ b/scripts/build_assets_image @@ -20,13 +20,21 @@ cp Dockerfile.assets assets_container.build/ COMMIT_REF_SLUG_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_SLUG} COMMIT_SHA_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_SHA} -COMMIT_REF_NAME_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_NAME} DESTINATIONS="--destination=$COMMIT_REF_SLUG_DESTINATION --destination=$COMMIT_SHA_DESTINATION" +# For EE branch builds, add a truncated SHA destination for later use by Omnibus +# auto-deploy builds +if [[ "${ASSETS_IMAGE_NAME}" == "gitlab-assets-ee" ]] && [ -n "$CI_COMMIT_BRANCH" ] +then + COMMIT_SHORT_SHA_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_SHA:0:11} + DESTINATIONS="$DESTINATIONS --destination=$COMMIT_SHORT_SHA_DESTINATION" +fi + # 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 + COMMIT_REF_NAME_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_NAME} DESTINATIONS="$DESTINATIONS --destination=$COMMIT_REF_NAME_DESTINATION" fi |