mirror of
https://github.com/thegeeklab/wp-ansible.git
synced 2024-11-21 23:50:40 +00:00
Merge pull request #25 from drone-plugins/drop-windows
Drop windows builds, ansible is not supported on windows
This commit is contained in:
commit
ce52110526
112
.drone.starlark
112
.drone.starlark
@ -5,8 +5,6 @@ def main(ctx):
|
||||
linux('amd64'),
|
||||
linux('arm64'),
|
||||
linux('arm'),
|
||||
windows('1903'),
|
||||
windows('1809'),
|
||||
]
|
||||
|
||||
after = manifest() + gitter()
|
||||
@ -184,116 +182,6 @@ def linux(arch):
|
||||
}
|
||||
}
|
||||
|
||||
def windows(version):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'ssh',
|
||||
'name': 'windows-%s' % version,
|
||||
'platform': {
|
||||
'os': 'windows'
|
||||
},
|
||||
'server': {
|
||||
'host': {
|
||||
'from_secret': 'windows_server_%s' % version
|
||||
},
|
||||
'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.%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,
|
||||
],
|
||||
'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.%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,
|
||||
],
|
||||
'when': {
|
||||
'ref': [
|
||||
'refs/tags/**',
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
'depends_on': [],
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
'refs/tags/**',
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
def manifest():
|
||||
return [{
|
||||
'kind': 'pipeline',
|
||||
|
@ -7,10 +7,6 @@
|
||||
---
|
||||
{"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 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": "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"], "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": "gitter", "clone": {"disable": true}, "steps": [{"name": "gitter", "image": "plugins/gitter", "pull": "always", "settings": {"webhook": {"from_secret": "gitter_webhook"}}}], "depends_on": ["manifest", "linux-amd64", "linux-arm64", "linux-arm", "windows-1903", "windows-1809"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**", "refs/pull/**"], "status": ["failure"]}}
|
||||
{"kind": "pipeline", "type": "docker", "name": "gitter", "clone": {"disable": true}, "steps": [{"name": "gitter", "image": "plugins/gitter", "pull": "always", "settings": {"webhook": {"from_secret": "gitter_webhook"}}}], "depends_on": ["manifest", "linux-amd64", "linux-arm64", "linux-arm"], "trigger": {"ref": ["refs/heads/master", "refs/tags/**", "refs/pull/**"], "status": ["failure"]}}
|
||||
|
@ -1,10 +0,0 @@
|
||||
# escape=`
|
||||
FROM plugins/base:windows-1809-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone Ansible" `
|
||||
org.label-schema.vendor="Drone.IO Community" `
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ADD release/windows/amd64/drone-ansible.exe C:/bin/drone-ansible.exe
|
||||
ENTRYPOINT [ "C:\\bin\\drone-ansible.exe" ]
|
@ -1,10 +0,0 @@
|
||||
# escape=`
|
||||
FROM plugins/base:windows-1903-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone Ansible" `
|
||||
org.label-schema.vendor="Drone.IO Community" `
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ADD release/windows/amd64/drone-ansible.exe C:/bin/drone-ansible.exe
|
||||
ENTRYPOINT [ "C:\\bin\\drone-ansible.exe" ]
|
@ -20,13 +20,3 @@ manifests:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
||||
- image: plugins/ansible:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1903-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1903
|
||||
- image: plugins/ansible:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1809
|
||||
|
Loading…
Reference in New Issue
Block a user