diff --git a/.drone.starlark b/.drone.starlark deleted file mode 100644 index 7950acb..0000000 --- a/.drone.starlark +++ /dev/null @@ -1,371 +0,0 @@ -def main(ctx): - before = testing() - - stages = [ - linux('amd64'), - linux('arm64'), - linux('arm'), - windows('1903'), - windows('1809'), - ] - - after = manifest() + gitter() - - for b in before: - for s in stages: - s['depends_on'].append(b['name']) - - for s in stages: - for a in after: - a['depends_on'].append(s['name']) - - return before + stages + after - -def testing(): - return [{ - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'testing', - 'platform': { - 'os': 'linux', - 'arch': 'amd64', - }, - 'steps': [ - { - 'name': 'vet', - 'image': 'golang:1.12', - 'pull': 'always', - 'commands': [ - 'go vet ./...' - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/go' - } - ] - }, - { - 'name': 'test', - 'image': 'golang:1.12', - 'pull': 'always', - 'commands': [ - 'go test -cover ./...' - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/go' - } - ] - } - ], - 'volumes': [ - { - 'name': 'gopath', - 'temp': {} - } - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - 'refs/pull/**' - ] - } - }] - -def linux(arch): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'name': 'linux-%s' % arch, - 'platform': { - 'os': 'linux', - 'arch': arch, - }, - '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/%s/drone-webhook' % arch - ], - '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/%s/drone-webhook' % arch - ], - 'when': { - 'event': [ - 'tag' - ] - } - }, - { - 'name': 'executable', - 'image': 'golang:1.12', - 'pull': 'always', - 'commands': [ - './release/linux/%s/drone-webhook --help' % arch - ] - }, - { - 'name': 'dryrun', - 'image': 'plugins/docker', - 'pull': 'always', - 'settings': { - 'dry_run': True, - 'tags': 'linux-%s' % arch, - 'dockerfile': 'docker/Dockerfile.linux.%s' % arch, - 'repo': 'plugins/webhook', - '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-%s' % arch, - 'dockerfile': 'docker/Dockerfile.linux.%s' % arch, - 'repo': 'plugins/webhook', - 'username': { - 'from_secret': 'docker_username' - }, - 'password': { - 'from_secret': 'docker_password' - } - }, - 'when': { - 'event': { - 'exclude': [ - 'pull_request' - ] - } - } - } - ], - 'depends_on': [], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**', - 'refs/pull/**' - ] - } - } - -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-webhook.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-webhook.exe', - ], - 'when': { - 'event': [ - 'tag' - ] - } - }, - { - 'name': 'executable', - 'commands': [ - './release/windows/amd64/drone-webhook.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/webhook:windows-%s-amd64 .' % (version, version), - 'docker run --rm plugins/webhook:windows-%s-amd64 --help' % version, - 'docker push plugins/webhook: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/webhook:${DRONE_TAG##v}-windows-%s-amd64 .' % (version, version), - 'docker run --rm plugins/webhook:${DRONE_TAG##v}-windows-%s-amd64 --help' % version, - 'docker push plugins/webhook:${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', - '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': [], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**' - ] - } - }] - -def gitter(): - return [{ - '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' - ], - 'trigger': { - 'ref': [ - 'refs/heads/master', - 'refs/tags/**' - ], - 'status': [ - 'failure' - ] - } - }] diff --git a/.drone.yml b/.drone.yml index d7cde30..67fd512 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,16 +1,254 @@ +kind: pipeline +type: vm +name: testing +platform: + os: linux + arch: amd64 +pool: + use: ubuntu + +steps: + - name: lint + image: golang:1.19 + pull: always + commands: + - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + - golangci-lint version + - golangci-lint run + volumes: + - name: gopath + path: "/go" + - name: test + image: golang:1.19 + commands: + - go test -cover ./... + volumes: + - name: gopath + path: "/go" +volumes: + - name: gopath + temp: {} +trigger: + ref: + - refs/heads/master + - refs/tags/** + - refs/pull/** + --- -{"kind": "pipeline", "type": "docker", "name": "testing", "platform": {"os": "linux", "arch": "amd64"}, "steps": [{"name": "vet", "image": "golang:1.12", "pull": "always", "commands": ["go vet ./..."], "volumes": [{"name": "gopath", "path": "/go"}]}, {"name": "test", "image": "golang:1.12", "pull": "always", "commands": ["go test -cover ./..."], "volumes": [{"name": "gopath", "path": "/go"}]}], "volumes": [{"name": "gopath", "temp": {}}], "trigger": {"ref": ["refs/heads/master", "refs/tags/**", "refs/pull/**"]}} +kind: pipeline +type: vm +name: linux-amd64 +platform: + os: linux + arch: amd64 +pool: + use: ubuntu + +steps: + - name: environment + image: golang:1.19 + pull: always + environment: + CGO_ENABLED: "0" + commands: + - go version + - go env + - name: build + image: golang:1.19 + environment: + CGO_ENABLED: "0" + commands: + - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-webhook . + - name: docker + image: plugins/docker + settings: + dockerfile: docker/Dockerfile.linux.amd64 + repo: plugins/webhook + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: linux-amd64 +depends_on: + - testing +trigger: + ref: + - refs/heads/master + - refs/tags/** + - refs/pull/** + --- -{"kind": "pipeline", "type": "docker", "name": "linux-amd64", "platform": {"os": "linux", "arch": "amd64"}, "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/amd64/drone-webhook"], "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/amd64/drone-webhook"], "when": {"event": ["tag"]}}, {"name": "executable", "image": "golang:1.12", "pull": "always", "commands": ["./release/linux/amd64/drone-webhook --help"]}, {"name": "dryrun", "image": "plugins/docker", "pull": "always", "settings": {"dry_run": true, "tags": "linux-amd64", "dockerfile": "docker/Dockerfile.linux.amd64", "repo": "plugins/webhook", "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-amd64", "dockerfile": "docker/Dockerfile.linux.amd64", "repo": "plugins/webhook", "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-arm64 +platform: + os: linux + arch: arm64 +pool: + use: ubuntu_arm64 + +steps: + - name: environment + image: golang:1.19 + pull: always + environment: + CGO_ENABLED: "0" + commands: + - go version + - go env + - name: build + image: golang:1.19 + environment: + CGO_ENABLED: "0" + commands: + - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-webhook . + - name: docker + image: plugins/docker + settings: + dockerfile: docker/Dockerfile.linux.arm64 + repo: plugins/webhook + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: linux-arm64 +depends_on: + - testing +trigger: + ref: + - refs/heads/master + - refs/tags/** + - refs/pull/** + --- -{"kind": "pipeline", "type": "docker", "name": "linux-arm64", "platform": {"os": "linux", "arch": "arm64"}, "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/arm64/drone-webhook"], "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/arm64/drone-webhook"], "when": {"event": ["tag"]}}, {"name": "executable", "image": "golang:1.12", "pull": "always", "commands": ["./release/linux/arm64/drone-webhook --help"]}, {"name": "dryrun", "image": "plugins/docker", "pull": "always", "settings": {"dry_run": true, "tags": "linux-arm64", "dockerfile": "docker/Dockerfile.linux.arm64", "repo": "plugins/webhook", "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-arm64", "dockerfile": "docker/Dockerfile.linux.arm64", "repo": "plugins/webhook", "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: vm +name: windows-1809 +platform: + os: windows + arch: amd64 +pool: + use: windows + +steps: + - name: environment + image: golang:1.19 + pull: always + environment: + CGO_ENABLED: "0" + commands: + - go version + - go env + - name: build + image: golang:1.19 + environment: + CGO_ENABLED: "0" + commands: + - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-webhook.exe . + - name: docker + image: plugins/docker + settings: + dockerfile: docker/Dockerfile.windows.1809 + repo: plugins/webhook + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-1809-amd64 + daemon_off: true + purge: false + when: + ref: + - refs/heads/master + - refs/tags/** +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-webhook"], "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-webhook"], "when": {"event": ["tag"]}}, {"name": "executable", "image": "golang:1.12", "pull": "always", "commands": ["./release/linux/arm/drone-webhook --help"]}, {"name": "dryrun", "image": "plugins/docker", "pull": "always", "settings": {"dry_run": true, "tags": "linux-arm", "dockerfile": "docker/Dockerfile.linux.arm", "repo": "plugins/webhook", "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/webhook", "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: vm +name: windows-ltsc2022 +platform: + os: windows + arch: amd64 +pool: + use: windows-2022 + +steps: + - name: environment + image: golang:1.19 + pull: always + environment: + CGO_ENABLED: "0" + commands: + - go version + - go env + - name: build + image: golang:1.19 + environment: + CGO_ENABLED: "0" + commands: + - go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-webhook.exe . + - name: docker + image: plugins/docker + settings: + dockerfile: docker/Dockerfile.windows.ltsc2022 + repo: plugins/webhook + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-ltsc2022-amd64 + daemon_off: true + purge: false + when: + ref: + - refs/heads/master + - refs/tags/** +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-webhook.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-webhook.exe"], "when": {"event": ["tag"]}}, {"name": "executable", "commands": ["./release/windows/amd64/drone-webhook.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/webhook:windows-1903-amd64 .", "docker run --rm plugins/webhook:windows-1903-amd64 --help", "docker push plugins/webhook: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/webhook:${DRONE_TAG##v}-windows-1903-amd64 .", "docker run --rm plugins/webhook:${DRONE_TAG##v}-windows-1903-amd64 --help", "docker push plugins/webhook:${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-webhook.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-webhook.exe"], "when": {"event": ["tag"]}}, {"name": "executable", "commands": ["./release/windows/amd64/drone-webhook.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/webhook:windows-1809-amd64 .", "docker run --rm plugins/webhook:windows-1809-amd64 --help", "docker push plugins/webhook: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/webhook:${DRONE_TAG##v}-windows-1809-amd64 .", "docker run --rm plugins/webhook:${DRONE_TAG##v}-windows-1809-amd64 --help", "docker push plugins/webhook:${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/**"], "status": ["failure"]}} +kind: pipeline +type: vm +name: manifest +platform: + os: linux + arch: amd64 +pool: + use: ubuntu + +steps: + - name: manifest + image: plugins/manifest + settings: + auto_tag: "true" + username: + from_secret: docker_username + password: + from_secret: docker_password + spec: docker/manifest.tmpl + ignore_missing: true +depends_on: + - linux-amd64 + - linux-arm64 + - windows-1809 + - windows-ltsc2022 +trigger: + ref: + - refs/heads/master + - refs/tags/** diff --git a/docker/Dockerfile.linux.arm b/docker/Dockerfile.linux.arm deleted file mode 100644 index 39faeda..0000000 --- a/docker/Dockerfile.linux.arm +++ /dev/null @@ -1,9 +0,0 @@ -FROM plugins/base:multiarch - -LABEL maintainer="Drone.IO Community " \ - org.label-schema.name="Drone Webhook" \ - org.label-schema.vendor="Drone.IO Community" \ - org.label-schema.schema-version="1.0" - -ADD release/linux/arm/drone-webhook /bin/ -ENTRYPOINT ["/bin/drone-webhook"] diff --git a/docker/Dockerfile.windows.1903 b/docker/Dockerfile.windows.ltsc2022 similarity index 74% rename from docker/Dockerfile.windows.1903 rename to docker/Dockerfile.windows.ltsc2022 index 4317b7e..ed3d229 100644 --- a/docker/Dockerfile.windows.1903 +++ b/docker/Dockerfile.windows.ltsc2022 @@ -1,5 +1,5 @@ # escape=` -FROM plugins/base:windows-1903-amd64 +FROM plugins/base:windows-ltsc2022-amd64@sha256:0f90d5bceb432f1ee6f93cf44eed6a38c322834edd55df8a6648c9e6f15131f4 LABEL maintainer="Drone.IO Community " ` org.label-schema.name="Drone Webhook" ` diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl index ba5a877..dd05ff7 100644 --- a/docker/manifest.tmpl +++ b/docker/manifest.tmpl @@ -14,17 +14,13 @@ manifests: platform: architecture: arm64 os: linux - - image: plugins/webhook:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - platform: - architecture: arm - os: linux - image: plugins/webhook:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 platform: architecture: amd64 os: windows version: 1809 - - image: plugins/webhook:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64 + - image: plugins/webhook:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-ltsc2022-amd64 platform: architecture: amd64 os: windows - version: 1903 + version: ltsc2022 \ No newline at end of file diff --git a/main.go b/main.go index bc262cb..fd48957 100644 --- a/main.go +++ b/main.go @@ -180,7 +180,7 @@ func main() { } if _, err := os.Stat("/run/drone/env"); err == nil { - godotenv.Overload("/run/drone/env") + _ = godotenv.Overload("/run/drone/env") } if err := app.Run(os.Args); err != nil {