X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fdocker-login.sh;h=ca4758f4e167720810f54cfae528a13e344a0455;hb=e50da79e348b4302edf4f2cc2ed4842830f9cc54;hp=08ec941ae805c35dfcf9eecfcba325bb2f0ba866;hpb=bc5892ef503dc4039aa0aae4043e5c9b2cc9a363;p=releng%2Fglobal-jjb.git diff --git a/shell/docker-login.sh b/shell/docker-login.sh index 08ec941a..ca4758f4 100644 --- a/shell/docker-login.sh +++ b/shell/docker-login.sh @@ -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"