setup windows distribution

This commit is contained in:
Brad Rydzewski
2019-10-31 18:09:51 -07:00
parent d0e71587b7
commit 025c3b343f
3 changed files with 142 additions and 14 deletions

View File

@@ -1,17 +1,24 @@
# this script is used by the continuous integration server to
# build and publish the docker image for a commit to master.
$env:GOOS=windows
$env:GOARCH=amd64
$env:CGO_ENABLED=0
$env:VERSION=1809
$env:GOOS="windows"
$env:GOARCH="amd64"
$env:CGO_ENABLED="0"
if (-not (Test-Path env:VERSION)) {
$env:VERSION="1809"
}
echo $env:GOOS
echo $env:GOARCH
echo $env:VERSION
# build the binary
go build -o release/windows/amd64/drone-runner-docker.exe
# build and publish the docker image
docker login -u $env:USERNAME -p $env:PASSWORD
docker build -f docker/Dockerfile.windows.$env:VERSION -t drone/drone-runner-docker:windows-$env:VERSION-amd64 .
docker build -f docker/Dockerfile.windows.amd64.$env:VERSION -t drone/drone-runner-docker:windows-$env:VERSION-amd64 .
docker push drone/drone-runner-docker:windows-$env:VERSION-amd64
# remove images from local cache