X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fdocker-login.sh;h=ca4758f4e167720810f54cfae528a13e344a0455;hb=32fc471adb587ff7ee252ebd1b1e6664119185ea;hp=cac51867b5757a7435ac6bbb84f749d8ad35a6ad;hpb=cc998bcae1d8018060bc2d227bf6deacee09dea1;p=releng%2Fglobal-jjb.git diff --git a/shell/docker-login.sh b/shell/docker-login.sh index cac51867..ca4758f4 100644 --- a/shell/docker-login.sh +++ b/shell/docker-login.sh @@ -8,7 +8,7 @@ # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################## - +echo "---> docker-login.sh" # Log into a custom hosted docker registry and / or docker.io # $DOCKER_REGISTRY : Optional @@ -79,7 +79,7 @@ set_creds() { # Login to the registry do_login() { docker_version=$( docker -v | awk '{print $3}') - if version_lt $docker_version "17.06.0" && \ + if version_lt "$docker_version" "17.06.0" && \ "$DOCKERHUB_REGISTRY" == "docker.io" && \ "$DOCKERHUB_EMAIL:-none" != 'none' then @@ -101,7 +101,7 @@ then # docker login requests an email address if nothing is passed to it # Nexus, however, does not need this and ignores the value - set_creds $REGISTRY + set_creds "$REGISTRY" do_login "$REGISTRY" none done fi @@ -109,7 +109,7 @@ fi # Login to docker.io after determining if email is needed. if [ "${DOCKERHUB_REGISTRY:-none}" != 'none' ] then - set_creds $DOCKERHUB_REGISTRY + set_creds "$DOCKERHUB_REGISTRY" if [ "${DOCKERHUB_EMAIL:-none}" != 'none' ] then do_login "$DOCKERHUB_REGISTRY" "$DOCKERHUB_EMAIL"