Skip to content

Commit fe1bd41

Browse files
authored
Merge pull request #8 from ecstatic-morse/windows-check-env
Ensure "DOCKER_{PASSWORD,USERNAME}" are set prior to deployment on AppVeyor
2 parents 6c76fb2 + 82abbdf commit fe1bd41

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

windows/ci/publish.ps1

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ $ErrorActionPreference = "Stop"
33
# Build the image
44
./windows/ci/build.ps1
55

6+
foreach ($var in "DOCKER_USERNAME", "DOCKER_PASSWORD") {
7+
if (-not (Test-Path "env:$var")) {
8+
echo "Environment variable \"$var\" not set"
9+
exit 22
10+
}
11+
}
12+
613
# Log in to dockerhub
714
[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Env:DOCKER_PASSWORD)).Trim() `
815
| docker login --username "$Env:DOCKER_USERNAME" --password-stdin

0 commit comments

Comments
 (0)