Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 0 additions & 112 deletions .drone.starlark
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ def main(ctx):
linux('amd64'),
linux('arm64'),
linux('arm'),
windows('1903'),
windows('1809'),
]

after = manifest() + gitter()
Expand Down Expand Up @@ -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',
Expand Down
8 changes: 2 additions & 6 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}}
10 changes: 0 additions & 10 deletions docker/Dockerfile.windows.1809

This file was deleted.

10 changes: 0 additions & 10 deletions docker/Dockerfile.windows.1903

This file was deleted.

10 changes: 0 additions & 10 deletions docker/manifest.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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