Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

fix(build): trim v from all image tags #137

Merged
merged 2 commits into from
Aug 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions scripts/release/buildscripts/push
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ echo "Set the build/unique image tag as: ${BUILD_TAG}"

function TagAndPushImage() {
REPO="$1"
TAG="$2"
# Trim the `v` from the TAG if it exists
# Example: v1.10.0 maps to 1.10.0
# Example: 1.10.0 maps to 1.10.0
# Example: v1.10.0-custom maps to 1.10.0-custom
TAG="${2#v}"

#Add an option to specify a custom TAG_SUFFIX
#via environment variable. Default is no tag.
Expand Down Expand Up @@ -87,7 +91,7 @@ then
# Example: v1.10.0 maps to 1.10.0
# Example: 1.10.0 maps to 1.10.0
# Example: v1.10.0-custom maps to 1.10.0-custom
shubham14bajpai marked this conversation as resolved.
Show resolved Hide resolved
TagAndPushImage "${DIMAGE}" "${TRAVIS_TAG#v}"
TagAndPushImage "${DIMAGE}" "${TRAVIS_TAG}"
TagAndPushImage "${DIMAGE}" "latest"
fi;
else
Expand All @@ -108,7 +112,7 @@ then
# When github is tagged with a release, then Travis will
# set the release tag in env TRAVIS_TAG
# Trim the `v` from the TRAVIS_TAG if it exists
shubham14bajpai marked this conversation as resolved.
Show resolved Hide resolved
TagAndPushImage "quay.io/${DIMAGE}" "${TRAVIS_TAG#v}"
TagAndPushImage "quay.io/${DIMAGE}" "${TRAVIS_TAG}"
TagAndPushImage "quay.io/${DIMAGE}" "latest"
fi;
else
Expand Down