0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-13 22:50:41 +00:00

Merge pull request #303 from drone-plugins/fix-windows-build

Fix Windows build
This commit is contained in:
Don 2020-11-09 16:44:15 -08:00 committed by GitHub
commit ad1fa9495f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,11 +55,9 @@ server:
from_secret: windows_username from_secret: windows_username
steps: steps:
- name: build - name: build-push
commands: commands:
# TODO use the new DRONE_SEMVER_SHORT environment variables to - go build -v -ldflags ('-X main.version={0}' -f $env:DRONE_COMMIT_SHA.Substring(0, 8)) -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
# publish docker images for tag events.
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD - docker login -u $env:USERNAME -p $env:PASSWORD
- docker build -f docker/docker/Dockerfile.windows.1809 -t plugins/docker:windows-1809-amd64 . - docker build -f docker/docker/Dockerfile.windows.1809 -t plugins/docker:windows-1809-amd64 .
- docker push plugins/docker:windows-1809-amd64 - docker push plugins/docker:windows-1809-amd64
@ -69,10 +67,31 @@ steps:
from_secret: docker_username from_secret: docker_username
PASSWORD: PASSWORD:
from_secret: docker_password from_secret: docker_password
when:
event:
exclude:
- tag
- name: build-tag
commands:
- go build -v -ldflags ('-X main.version={0}' -f $env:DRONE_SEMVER_SHORT) -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD
- docker build -f docker/docker/Dockerfile.windows.1809 -t ('plugins/docker:{0}-windows-1809-amd64' -f $env:DRONE_SEMVER_SHORT) .
- docker push ('plugins/docker:{0}-windows-1809-amd64' -t $env:DRONE_SEMVER_SHORT)
environment:
CGO_ENABLED: "0"
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
when:
event:
- tag
trigger: trigger:
event: ref:
- push - refs/heads/master
- "refs/tags/**"
depends_on: depends_on:
- testing - testing
@ -93,11 +112,9 @@ server:
from_secret: windows_username from_secret: windows_username
steps: steps:
- name: build - name: build-push
commands: commands:
# TODO use the new DRONE_SEMVER_SHORT environment variables to - go build -v -ldflags ('-X main.version={0}' -f $env:DRONE_COMMIT_SHA.Substring(0, 8)) -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
# publish docker images for tag events.
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD - docker login -u $env:USERNAME -p $env:PASSWORD
- docker build -f docker/docker/Dockerfile.windows.1903 -t plugins/docker:windows-1903-amd64 . - docker build -f docker/docker/Dockerfile.windows.1903 -t plugins/docker:windows-1903-amd64 .
- docker push plugins/docker:windows-1903-amd64 - docker push plugins/docker:windows-1903-amd64
@ -107,10 +124,31 @@ steps:
from_secret: docker_username from_secret: docker_username
PASSWORD: PASSWORD:
from_secret: docker_password from_secret: docker_password
when:
event:
exclude:
- tag
- name: build-tag
commands:
- go build -v -ldflags ('-X main.version={0}' -f $env:DRONE_SEMVER_SHORT) -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD
- docker build -f docker/docker/Dockerfile.windows.1903 -t ('plugins/docker:{0}-windows-1903-amd64' -f $env:DRONE_SEMVER_SHORT) .
- docker push ('plugins/docker:{0}-windows-1903-amd64' -t $env:DRONE_SEMVER_SHORT)
environment:
CGO_ENABLED: "0"
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
when:
event:
- tag
trigger: trigger:
event: ref:
- push - refs/heads/master
- "refs/tags/**"
depends_on: depends_on:
- testing - testing
@ -131,11 +169,9 @@ server:
from_secret: windows_username from_secret: windows_username
steps: steps:
- name: build - name: build-push
commands: commands:
# TODO use the new DRONE_SEMVER_SHORT environment variables to - go build -v -ldflags ('-X main.version={0}' -f $env:DRONE_COMMIT_SHA.Substring(0, 8)) -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
# publish docker images for tag events.
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD - docker login -u $env:USERNAME -p $env:PASSWORD
- docker build -f docker/docker/Dockerfile.windows.1909 -t plugins/docker:windows-1909-amd64 . - docker build -f docker/docker/Dockerfile.windows.1909 -t plugins/docker:windows-1909-amd64 .
- docker push plugins/docker:windows-1909-amd64 - docker push plugins/docker:windows-1909-amd64
@ -145,10 +181,31 @@ steps:
from_secret: docker_username from_secret: docker_username
PASSWORD: PASSWORD:
from_secret: docker_password from_secret: docker_password
when:
event:
exclude:
- tag
- name: build-tag
commands:
- go build -v -ldflags ('-X main.version={0}' -f $env:DRONE_SEMVER_SHORT) -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD
- docker build -f docker/docker/Dockerfile.windows.1909 -t ('plugins/docker:{0}-windows-1909-amd64' -f $env:DRONE_SEMVER_SHORT) .
- docker push ('plugins/docker:{0}-windows-1909-amd64' -t $env:DRONE_SEMVER_SHORT)
environment:
CGO_ENABLED: "0"
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
when:
event:
- tag
trigger: trigger:
event: ref:
- push - refs/heads/master
- "refs/tags/**"
depends_on: depends_on:
- testing - testing