From 60039de67d38f6d022675e04370ad89a6f0ea1ab Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 8 Mar 2019 16:38:21 -0500 Subject: [PATCH] only log into docker when password available --- appveyor.yml | 1 - build-ci.sh | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 145c27683e..94127fae25 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,7 +19,6 @@ init: - ps: Install-Product node $env:nodejs_version install: -- sh: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - ps: choco install cloc --no-progress - ps: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git - ps: $env:package_version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version diff --git a/build-ci.sh b/build-ci.sh index 797357d957..3195ef32e0 100644 --- a/build-ci.sh +++ b/build-ci.sh @@ -15,6 +15,11 @@ fi echo "Prod deploy: ${PROD_DEPLOY}" echo "Tag name: ${TAG_NAME}" +if [ "${DOCKER_USERNAME}" != "" -a "${DOCKER_PASSWORD}" != "" ] +then + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin +fi + chmod +x ./build.sh ./build.sh ./build.sh tag dev