Fix windows pipeline

This commit is contained in:
Shubham Agrawal
2022-01-06 20:27:31 +05:30
parent 368583a464
commit c898b40dd6
2 changed files with 6 additions and 3 deletions

View File

@@ -17,14 +17,19 @@ if (-not (Test-Path env:REGISTRY)) {
echo $env:GOOS
echo $env:GOARCH
echo $env:VERSION
echo $env:REGISTRY
# build the binary
Write-Host "+ go build -o release/windows/amd64/drone-$env:REGISTRY.exe";
go build -o release/windows/amd64/drone-$env:REGISTRY.exe
# build and publish the docker image
docker login -u $env:USERNAME -p $env:PASSWORD
Write-Host "+ docker build -f docker/$env:REGISTRY/Dockerfile.windows.amd64.$env:VERSION -t plugins/$env:REGISTRY:windows-$env:VERSION-amd64 .";
docker build -f docker/$env:REGISTRY/Dockerfile.windows.amd64.$env:VERSION -t plugins/$env:REGISTRY:windows-$env:VERSION-amd64 .
Write-Host "+ docker push plugins/$env:REGISTRY:windows-$env:VERSION-amd64"
docker push plugins/$env:REGISTRY:windows-$env:VERSION-amd64
# remove images from local cache
Write-Host "+ docker rmi plugins/$env:REGISTRY:windows-$env:VERSION-amd64"
docker rmi plugins/$env:REGISTRY:windows-$env:VERSION-amd64