forked from Ivasoft/drone-docker
Compare commits
1 Commits
master
...
win_test_p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c898b40dd6 |
@@ -63,8 +63,6 @@ steps:
|
|||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
commands:
|
commands:
|
||||||
- powershell.exe scripts/windows/latest.ps1
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
when:
|
|
||||||
event: [ push ]
|
|
||||||
|
|
||||||
- name: build_tag
|
- name: build_tag
|
||||||
environment:
|
environment:
|
||||||
@@ -86,7 +84,7 @@ trigger:
|
|||||||
ref:
|
ref:
|
||||||
- refs/heads/master
|
- refs/heads/master
|
||||||
- refs/tags/*
|
- refs/tags/*
|
||||||
|
- "refs/pull/**"
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
|
|||||||
@@ -17,14 +17,19 @@ if (-not (Test-Path env:REGISTRY)) {
|
|||||||
echo $env:GOOS
|
echo $env:GOOS
|
||||||
echo $env:GOARCH
|
echo $env:GOARCH
|
||||||
echo $env:VERSION
|
echo $env:VERSION
|
||||||
|
echo $env:REGISTRY
|
||||||
|
|
||||||
# build the binary
|
# 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
|
go build -o release/windows/amd64/drone-$env:REGISTRY.exe
|
||||||
|
|
||||||
# build and publish the docker image
|
# build and publish the docker image
|
||||||
docker login -u $env:USERNAME -p $env:PASSWORD
|
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 .
|
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
|
docker push plugins/$env:REGISTRY:windows-$env:VERSION-amd64
|
||||||
|
|
||||||
# remove images from local cache
|
# 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
|
docker rmi plugins/$env:REGISTRY:windows-$env:VERSION-amd64
|
||||||
|
|||||||
Reference in New Issue
Block a user