Skip to content

Commit

Permalink
Use only version hash for local docker image tag
Browse files Browse the repository at this point in the history
When the VERSION file is also used, this can lead to invalid characters in the
docker tag (e.g. `1.11.0+dap.1`).
  • Loading branch information
micahlee committed Feb 2, 2021
1 parent a39db6f commit ec7ca4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ pipeline {
def tagWithSHA() {
sh(
returnStdout: true,
script: 'echo $(< VERSION)-$(git rev-parse --short=8 HEAD)'
script: 'echo $(git rev-parse --short=8 HEAD)'
)
}

Expand Down
2 changes: 1 addition & 1 deletion build_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Functions to generate version numbers for this project

function version_tag() {
echo "$(< VERSION)-$(git rev-parse --short=8 HEAD)"
echo "$(git rev-parse --short=8 HEAD)"
}

# generate less specific versions, eg. given 1.2.3 will print 1.2 and 1
Expand Down
2 changes: 1 addition & 1 deletion ci/authn-k8s/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function createNginxCert() {
}

function buildDockerImages() {
conjur_version=$(echo "$(< ../../VERSION)-$(git rev-parse --short=8 HEAD)")
conjur_version=$(echo "$(git rev-parse --short=8 HEAD)")
DOCKER_REGISTRY_PATH="registry.tld"

docker pull $DOCKER_REGISTRY_PATH/conjur:$conjur_version
Expand Down

0 comments on commit ec7ca4a

Please sign in to comment.