mirror of
https://github.com/thegeeklab/wp-ansible.git
synced 2024-11-25 09:00:39 +00:00
Test windows image before publishing
This commit is contained in:
parent
92e18089f6
commit
3f9bea29a4
@ -253,6 +253,7 @@ def windows(version):
|
|||||||
'commands': [
|
'commands': [
|
||||||
'echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin',
|
'echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin',
|
||||||
'docker build --pull -f docker/Dockerfile.windows.%s -t plugins/ansible:windows-%s-amd64 .' % (version, version),
|
'docker build --pull -f docker/Dockerfile.windows.%s -t plugins/ansible:windows-%s-amd64 .' % (version, version),
|
||||||
|
'docker run --rm plugins/ansible:windows-%s-amd64 --help' % version,
|
||||||
'docker push plugins/ansible:windows-%s-amd64' % version,
|
'docker push plugins/ansible:windows-%s-amd64' % version,
|
||||||
],
|
],
|
||||||
'when': {
|
'when': {
|
||||||
@ -274,6 +275,7 @@ def windows(version):
|
|||||||
'commands': [
|
'commands': [
|
||||||
'echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin',
|
'echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin',
|
||||||
'docker build --pull -f docker/Dockerfile.windows.%s -t plugins/ansible:${DRONE_TAG##v}-windows-%s-amd64 .' % (version, version),
|
'docker build --pull -f docker/Dockerfile.windows.%s -t plugins/ansible:${DRONE_TAG##v}-windows-%s-amd64 .' % (version, version),
|
||||||
|
'docker run --rm plugins/ansible:${DRONE_TAG##v}-windows-%s-amd64 --help' % version,
|
||||||
'docker push plugins/ansible:${DRONE_TAG##v}-windows-%s-amd64' % version,
|
'docker push plugins/ansible:${DRONE_TAG##v}-windows-%s-amd64' % version,
|
||||||
],
|
],
|
||||||
'when': {
|
'when': {
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
---
|
---
|
||||||
{"kind": "pipeline", "type": "docker", "name": "linux-arm", "platform": {"os": "linux", "arch": "arm"}, "steps": [{"name": "build-push", "image": "golang:1.12", "pull": "always", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ansible"], "when": {"event": {"exclude": ["tag"]}}}, {"name": "build-tag", "image": "golang:1.12", "pull": "always", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ansible"], "when": {"event": ["tag"]}}, {"name": "executable", "image": "golang:1.12", "pull": "always", "commands": ["./release/linux/arm/drone-ansible --help"]}, {"name": "dryrun", "image": "plugins/docker", "pull": "always", "settings": {"dry_run": true, "tags": "linux-arm", "dockerfile": "docker/Dockerfile.linux.arm", "repo": "plugins/ansible", "username": {"from_secret": "docker_username"}, "password": {"from_secret": "docker_password"}}, "when": {"event": ["pull_request"]}}, {"name": "publish", "image": "plugins/docker", "pull": "always", "settings": {"auto_tag": true, "auto_tag_suffix": "linux-arm", "dockerfile": "docker/Dockerfile.linux.arm", "repo": "plugins/ansible", "username": {"from_secret": "docker_username"}, "password": {"from_secret": "docker_password"}}, "when": {"event": {"exclude": ["pull_request"]}}}], "depends_on": ["testing"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**", "refs/pull/**"]}}
|
{"kind": "pipeline", "type": "docker", "name": "linux-arm", "platform": {"os": "linux", "arch": "arm"}, "steps": [{"name": "build-push", "image": "golang:1.12", "pull": "always", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ansible"], "when": {"event": {"exclude": ["tag"]}}}, {"name": "build-tag", "image": "golang:1.12", "pull": "always", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ansible"], "when": {"event": ["tag"]}}, {"name": "executable", "image": "golang:1.12", "pull": "always", "commands": ["./release/linux/arm/drone-ansible --help"]}, {"name": "dryrun", "image": "plugins/docker", "pull": "always", "settings": {"dry_run": true, "tags": "linux-arm", "dockerfile": "docker/Dockerfile.linux.arm", "repo": "plugins/ansible", "username": {"from_secret": "docker_username"}, "password": {"from_secret": "docker_password"}}, "when": {"event": ["pull_request"]}}, {"name": "publish", "image": "plugins/docker", "pull": "always", "settings": {"auto_tag": true, "auto_tag_suffix": "linux-arm", "dockerfile": "docker/Dockerfile.linux.arm", "repo": "plugins/ansible", "username": {"from_secret": "docker_username"}, "password": {"from_secret": "docker_password"}}, "when": {"event": {"exclude": ["pull_request"]}}}], "depends_on": ["testing"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**", "refs/pull/**"]}}
|
||||||
---
|
---
|
||||||
{"kind": "pipeline", "type": "ssh", "name": "windows-1903", "platform": {"os": "windows"}, "server": {"host": {"from_secret": "windows_server_1903"}, "user": {"from_secret": "windows_username"}, "password": {"from_secret": "windows_password"}}, "steps": [{"name": "build-push", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": {"exclude": ["tag"]}}}, {"name": "build-tag", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": ["tag"]}}, {"name": "executable", "commands": ["./release/windows/amd64/drone-ansible.exe --help"]}, {"name": "latest", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1903 -t plugins/ansible:windows-1903-amd64 .", "docker push plugins/ansible:windows-1903-amd64"], "when": {"ref": ["refs/heads/master"]}}, {"name": "tagged", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1903 -t plugins/ansible:${DRONE_TAG##v}-windows-1903-amd64 .", "docker push plugins/ansible:${DRONE_TAG##v}-windows-1903-amd64"], "when": {"ref": ["refs/tags/**"]}}], "depends_on": ["testing"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**"]}}
|
{"kind": "pipeline", "type": "ssh", "name": "windows-1903", "platform": {"os": "windows"}, "server": {"host": {"from_secret": "windows_server_1903"}, "user": {"from_secret": "windows_username"}, "password": {"from_secret": "windows_password"}}, "steps": [{"name": "build-push", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": {"exclude": ["tag"]}}}, {"name": "build-tag", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": ["tag"]}}, {"name": "executable", "commands": ["./release/windows/amd64/drone-ansible.exe --help"]}, {"name": "latest", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1903 -t plugins/ansible:windows-1903-amd64 .", "docker run --rm plugins/ansible:windows-1903-amd64 --help", "docker push plugins/ansible:windows-1903-amd64"], "when": {"ref": ["refs/heads/master"]}}, {"name": "tagged", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1903 -t plugins/ansible:${DRONE_TAG##v}-windows-1903-amd64 .", "docker run --rm plugins/ansible:${DRONE_TAG##v}-windows-1903-amd64 --help", "docker push plugins/ansible:${DRONE_TAG##v}-windows-1903-amd64"], "when": {"ref": ["refs/tags/**"]}}], "depends_on": ["testing"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**"]}}
|
||||||
---
|
---
|
||||||
{"kind": "pipeline", "type": "ssh", "name": "windows-1809", "platform": {"os": "windows"}, "server": {"host": {"from_secret": "windows_server_1809"}, "user": {"from_secret": "windows_username"}, "password": {"from_secret": "windows_password"}}, "steps": [{"name": "build-push", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": {"exclude": ["tag"]}}}, {"name": "build-tag", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": ["tag"]}}, {"name": "executable", "commands": ["./release/windows/amd64/drone-ansible.exe --help"]}, {"name": "latest", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1809 -t plugins/ansible:windows-1809-amd64 .", "docker push plugins/ansible:windows-1809-amd64"], "when": {"ref": ["refs/heads/master"]}}, {"name": "tagged", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1809 -t plugins/ansible:${DRONE_TAG##v}-windows-1809-amd64 .", "docker push plugins/ansible:${DRONE_TAG##v}-windows-1809-amd64"], "when": {"ref": ["refs/tags/**"]}}], "depends_on": ["testing"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**"]}}
|
{"kind": "pipeline", "type": "ssh", "name": "windows-1809", "platform": {"os": "windows"}, "server": {"host": {"from_secret": "windows_server_1809"}, "user": {"from_secret": "windows_username"}, "password": {"from_secret": "windows_password"}}, "steps": [{"name": "build-push", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": {"exclude": ["tag"]}}}, {"name": "build-tag", "environment": {"CGO_ENABLED": "0"}, "commands": ["go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-ansible.exe"], "when": {"event": ["tag"]}}, {"name": "executable", "commands": ["./release/windows/amd64/drone-ansible.exe --help"]}, {"name": "latest", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1809 -t plugins/ansible:windows-1809-amd64 .", "docker run --rm plugins/ansible:windows-1809-amd64 --help", "docker push plugins/ansible:windows-1809-amd64"], "when": {"ref": ["refs/heads/master"]}}, {"name": "tagged", "environment": {"USERNAME": {"from_secret": "docker_username"}, "PASSWORD": {"from_secret": "docker_password"}}, "commands": ["echo $env:PASSWORD | docker login --username $env:USERNAME --password-stdin", "docker build --pull -f docker/Dockerfile.windows.1809 -t plugins/ansible:${DRONE_TAG##v}-windows-1809-amd64 .", "docker run --rm plugins/ansible:${DRONE_TAG##v}-windows-1809-amd64 --help", "docker push plugins/ansible:${DRONE_TAG##v}-windows-1809-amd64"], "when": {"ref": ["refs/tags/**"]}}], "depends_on": ["testing"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**"]}}
|
||||||
---
|
---
|
||||||
{"kind": "pipeline", "type": "docker", "name": "manifest", "steps": [{"name": "manifest", "image": "plugins/manifest", "pull": "always", "settings": {"auto_tag": "true", "username": {"from_secret": "docker_username"}, "password": {"from_secret": "docker_password"}, "spec": "docker/manifest.tmpl", "ignore_missing": "true"}}, {"name": "microbadger", "image": "plugins/webhook", "pull": "always", "settings": {"urls": {"from_secret": "microbadger_url"}}}], "depends_on": ["linux-amd64", "linux-arm64", "linux-arm", "windows-1903", "windows-1809"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**"]}}
|
{"kind": "pipeline", "type": "docker", "name": "manifest", "steps": [{"name": "manifest", "image": "plugins/manifest", "pull": "always", "settings": {"auto_tag": "true", "username": {"from_secret": "docker_username"}, "password": {"from_secret": "docker_password"}, "spec": "docker/manifest.tmpl", "ignore_missing": "true"}}, {"name": "microbadger", "image": "plugins/webhook", "pull": "always", "settings": {"urls": {"from_secret": "microbadger_url"}}}], "depends_on": ["linux-amd64", "linux-arm64", "linux-arm", "windows-1903", "windows-1809"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**"]}}
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user