diff --git a/.drone.jsonnet b/.drone.jsonnet deleted file mode 100644 index 99832f4..0000000 --- a/.drone.jsonnet +++ /dev/null @@ -1,50 +0,0 @@ -local pipeline = import 'pipeline.libsonnet'; - -[ - pipeline.test('linux', 'amd64'), - - pipeline.build('docker', 'linux', 'amd64'), - pipeline.build('docker', 'linux', 'arm64'), - pipeline.build('docker', 'linux', 'arm'), - pipeline.notifications('docker', depends_on=[ - 'linux-amd64', - 'linux-arm64', - 'linux-arm', - ]), - - pipeline.build('gcr', 'linux', 'amd64'), - pipeline.build('gcr', 'linux', 'arm64'), - pipeline.build('gcr', 'linux', 'arm'), - pipeline.notifications('gcr', depends_on=[ - 'linux-amd64', - 'linux-arm64', - 'linux-arm', - ]), - - pipeline.build('acr', 'linux', 'amd64'), - pipeline.build('acr', 'linux', 'arm64'), - pipeline.build('acr', 'linux', 'arm'), - pipeline.notifications('acr', depends_on=[ - 'linux-amd64', - 'linux-arm64', - 'linux-arm', - ]), - - pipeline.build('ecr', 'linux', 'amd64'), - pipeline.build('ecr', 'linux', 'arm64'), - pipeline.build('ecr', 'linux', 'arm'), - pipeline.notifications('ecr', depends_on=[ - 'linux-amd64', - 'linux-arm64', - 'linux-arm', - ]), - - pipeline.build('heroku', 'linux', 'amd64'), - pipeline.build('heroku', 'linux', 'arm64'), - pipeline.build('heroku', 'linux', 'arm'), - pipeline.notifications('heroku', depends_on=[ - 'linux-amd64', - 'linux-arm64', - 'linux-arm', - ]), -] diff --git a/.drone.yml b/.drone.yml index a0476b3..94ce3f8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,1185 +1,991 @@ --- kind: pipeline name: testing +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: vet - image: golang:1.17.3 - commands: - - go vet ./... - environment: - GO111MODULE: on - volumes: - - name: gopath - path: /go + - name: vet + image: golang:1.17 + commands: + - go vet ./... + environment: -- name: test - image: golang:1.17.3 - commands: - - go test -cover ./... - environment: - GO111MODULE: on - volumes: - - name: gopath - path: /go + volumes: + - name: gopath + path: /go + + - name: test + image: golang:1.17 + commands: + - go test -cover ./... + environment: + + volumes: + - name: gopath + path: /go volumes: -- name: gopath - temp: {} + - name: gopath + temp: {} trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" --- kind: pipeline -type: ssh -name: windows-1809-docker +type: vm +name: windows-1809 + +pool: + use: windows platform: os: windows - -server: - host: windows.1809.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username + arch: amd64 steps: -- name: build_latest - environment: - VERSION: 1809 - REGISTRY: docker - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1809 - REGISTRY: docker - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] + - name: go build + image: golang:1.17 + environment: + CGO_ENABLED: 0 + commands: + - go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker + - go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr + - go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr + - go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr + - name: build docker plugin + image: plugins/docker + settings: + dockerfile: docker/docker/Dockerfile.windows.amd64.1809 + repo: plugins/docker + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + daemon_off: true + auto_tag_suffix: windows-1809-amd64 + purge: false + when: + event: [push, tag] + - name: build ecr plugin + image: plugins/docker + settings: + dockerfile: docker/ecr/Dockerfile.windows.amd64.1809 + repo: plugins/docker + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-1809-amd64 + purge: false + when: + event: [push, tag] + - name: build gcr plugin + image: plugins/docker + settings: + dockerfile: docker/gcr/Dockerfile.windows.amd64.1809 + repo: plugins/gcr + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-1809-amd64 + purge: false + when: + event: [push, tag] + - name: build acr plugin + image: plugins/docker + settings: + dockerfile: docker/acr/Dockerfile.windows.amd64.1809 + repo: plugins/acr + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-1809-amd64 + purge: false + when: + event: [push, tag] depends_on: - testing trigger: ref: - - refs/heads/master - - refs/tags/* + - refs/heads/master + - refs/tags/* + - "refs/pull/**" --- kind: pipeline -type: ssh -name: windows-1809-ecr +type: vm +name: windows-ltsc2022 + +pool: + use: windows-2022 platform: os: windows -server: - host: windows.1809.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - steps: -- name: build_latest - environment: - VERSION: 1809 - REGISTRY: ecr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1809 - REGISTRY: ecr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] - -depends_on: - - testing - - windows-1809-docker - -trigger: - ref: - - refs/heads/master - - refs/tags/* - ---- -kind: pipeline -type: ssh -name: windows-1809-gcr - -platform: - os: windows - -server: - host: windows.1809.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - -steps: -- name: build_latest - environment: - VERSION: 1809 - REGISTRY: gcr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1809 - REGISTRY: gcr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] - -depends_on: - - testing - - windows-1809-ecr - -trigger: - ref: - - refs/heads/master - - refs/tags/* - ---- -kind: pipeline -type: ssh -name: windows-1809-acr - -platform: - os: windows - -server: - host: windows.1809.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - -steps: -- name: build_latest - environment: - VERSION: 1809 - REGISTRY: acr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1809 - REGISTRY: acr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] - -depends_on: - - testing - - windows-1809-gcr - -trigger: - ref: - - refs/heads/master - - refs/tags/* - ---- -kind: pipeline -type: ssh -name: windows-1909-docker - -platform: - os: windows - -server: - host: windows.1909.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - -steps: -- name: build_latest - environment: - VERSION: 1909 - REGISTRY: docker - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1909 - REGISTRY: docker - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] + - name: go build + image: golang:1.17 + environment: + CGO_ENABLED: 0 + commands: + - go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker + - go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr + - go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr + - go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr + - name: build docker plugin + image: plugins/docker + settings: + dockerfile: docker/docker/Dockerfile.windows.amd64.ltsc2022 + repo: plugins/docker + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-ltsc2022-amd64 + purge: false + when: + event: [push, tag] + - name: build ecr plugin + image: plugins/docker + settings: + dockerfile: docker/ecr/Dockerfile.windows.amd64.ltsc2022 + repo: plugins/ecr + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-ltsc2022-amd64 + purge: false + when: + event: [push, tag] + - name: build gcr plugin + image: plugins/docker + settings: + dockerfile: docker/gcr/Dockerfile.windows.amd64.ltsc2022 + repo: plugins/gcr + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-ltsc2022-amd64 + purge: false + when: + event: [push, tag] + - name: build acr plugin + image: plugins/docker + settings: + dockerfile: docker/acr/Dockerfile.windows.amd64.ltsc2022 + repo: plugins/acr + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-ltsc2022-amd64 + purge: false + when: + event: [push, tag] depends_on: - testing trigger: ref: - - refs/heads/master - - refs/tags/* - ---- -kind: pipeline -type: ssh -name: windows-1909-ecr - -platform: - os: windows - -server: - host: windows.1909.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - -steps: -- name: build_latest - environment: - VERSION: 1909 - REGISTRY: ecr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1909 - REGISTRY: ecr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] - -depends_on: - - testing - -trigger: - ref: - - refs/heads/master - - refs/tags/* - ---- -kind: pipeline -type: ssh -name: windows-1909-gcr - -platform: - os: windows - -server: - host: windows.1909.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - -steps: -- name: build_latest - environment: - VERSION: 1909 - REGISTRY: gcr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1909 - REGISTRY: gcr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] - -depends_on: - - testing - -trigger: - ref: - - refs/heads/master - - refs/tags/* - ---- -kind: pipeline -type: ssh -name: windows-1909-acr - -platform: - os: windows - -server: - host: windows.1909.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - -steps: -- name: build_latest - environment: - VERSION: 1909 - REGISTRY: acr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/latest.ps1 - when: - event: [ push ] - -- name: build_tag - environment: - VERSION: 1909 - REGISTRY: acr - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - commands: - - powershell.exe scripts/windows/tag.ps1 - when: - event: [ tag ] - -depends_on: - - testing - -trigger: - ref: - - refs/heads/master - - refs/tags/* + - refs/heads/master + - refs/tags/* + - "refs/pull/**" --- kind: pipeline name: linux-amd64-docker +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker' + environment: + CGO_ENABLED: 0 + when: + event: + - tag -- name: executable - image: golang:1.17.3 - commands: - - ./release/linux/amd64/drone-docker --help + - name: executable + image: golang:1.17 + commands: + - ./release/linux/amd64/drone-docker --help -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-amd64 - daemon_off: false - dockerfile: docker/docker/Dockerfile.linux.amd64 - password: - from_secret: docker_password - repo: plugins/docker - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + daemon_off: false + dockerfile: docker/docker/Dockerfile.linux.amd64 + password: + from_secret: docker_password + repo: plugins/docker + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- testing + - testing --- kind: pipeline name: linux-arm64-docker +type: vm + +pool: + use: ubuntu_arm64 platform: os: linux arch: arm64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker' + environment: + CGO_ENABLED: 0 + when: + event: + - tag -- name: executable - image: golang:1.17.3 - commands: - - ./release/linux/arm64/drone-docker --help + - name: executable + image: golang:1.17 + commands: + - ./release/linux/arm64/drone-docker --help -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-arm64 - daemon_off: false - dockerfile: docker/docker/Dockerfile.linux.arm64 - password: - from_secret: docker_password - repo: plugins/docker - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-arm64 + daemon_off: false + dockerfile: docker/docker/Dockerfile.linux.arm64 + password: + from_secret: docker_password + repo: plugins/docker + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- testing + - testing --- kind: pipeline name: notifications-docker +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: manifest - image: plugins/manifest - settings: - auto_tag: true - ignore_missing: true - password: - from_secret: docker_password - spec: docker/docker/manifest.tmpl - username: - from_secret: docker_username + - name: manifest + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + password: + from_secret: docker_password + spec: docker/docker/manifest.tmpl + username: + from_secret: docker_username trigger: ref: - - refs/heads/master - - "refs/tags/**" + - refs/heads/master + - "refs/tags/**" depends_on: -- windows-1809-docker -- windows-1909-docker -- linux-amd64-docker -- linux-arm64-docker + - windows-1809 + - windows-ltsc2022 + - linux-amd64-docker + - linux-arm64-docker --- kind: pipeline name: linux-amd64-gcr +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr' + environment: + CGO_ENABLED: 0 + when: + event: + - tag -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-amd64 - daemon_off: false - dockerfile: docker/gcr/Dockerfile.linux.amd64 - password: - from_secret: docker_password - repo: plugins/gcr - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + daemon_off: false + dockerfile: docker/gcr/Dockerfile.linux.amd64 + password: + from_secret: docker_password + repo: plugins/gcr + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-amd64-docker + - linux-amd64-docker --- kind: pipeline name: linux-arm64-gcr +type: vm + +pool: + use: ubuntu_arm64 platform: os: linux arch: arm64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr' + environment: + CGO_ENABLED: 0 + when: + event: + - tag -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-arm64 - daemon_off: false - dockerfile: docker/gcr/Dockerfile.linux.arm64 - password: - from_secret: docker_password - repo: plugins/gcr - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-arm64 + daemon_off: false + dockerfile: docker/gcr/Dockerfile.linux.arm64 + password: + from_secret: docker_password + repo: plugins/gcr + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-arm64-docker + - linux-arm64-docker --- kind: pipeline name: notifications-gcr +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: manifest - image: plugins/manifest - settings: - auto_tag: true - ignore_missing: true - password: - from_secret: docker_password - spec: docker/gcr/manifest.tmpl - username: - from_secret: docker_username + - name: manifest + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + password: + from_secret: docker_password + spec: docker/gcr/manifest.tmpl + username: + from_secret: docker_username trigger: ref: - - refs/heads/master - - "refs/tags/**" + - refs/heads/master + - "refs/tags/**" depends_on: -- windows-1809-gcr -- windows-1909-gcr -- linux-amd64-gcr -- linux-arm64-gcr + - windows-1809 + - windows-ltsc2022 + - linux-amd64-gcr + - linux-arm64-gcr --- kind: pipeline name: linux-amd64-ecr +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag - -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag - -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-amd64 - daemon_off: false - dockerfile: docker/ecr/Dockerfile.linux.amd64 - password: - from_secret: docker_password - repo: plugins/ecr - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr' + environment: + CGO_ENABLED: 0 + when: + event: + - tag + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + daemon_off: false + dockerfile: docker/ecr/Dockerfile.linux.amd64 + password: + from_secret: docker_password + repo: plugins/ecr + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-amd64-docker + - linux-amd64-docker --- kind: pipeline name: linux-arm64-ecr +type: vm + +pool: + use: ubuntu_arm64 platform: os: linux arch: arm64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag - -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag - -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-arm64 - daemon_off: false - dockerfile: docker/ecr/Dockerfile.linux.arm64 - password: - from_secret: docker_password - repo: plugins/ecr - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr' + environment: + CGO_ENABLED: 0 + when: + event: + - tag + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-arm64 + daemon_off: false + dockerfile: docker/ecr/Dockerfile.linux.arm64 + password: + from_secret: docker_password + repo: plugins/ecr + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-arm64-docker + - linux-arm64-docker --- kind: pipeline name: notifications-ecr +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: manifest - image: plugins/manifest - settings: - auto_tag: true - ignore_missing: true - password: - from_secret: docker_password - spec: docker/ecr/manifest.tmpl - username: - from_secret: docker_username + - name: manifest + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + password: + from_secret: docker_password + spec: docker/ecr/manifest.tmpl + username: + from_secret: docker_username trigger: ref: - - refs/heads/master - - "refs/tags/**" + - refs/heads/master + - "refs/tags/**" depends_on: -- windows-1809-ecr -- windows-1909-ecr -- linux-amd64-ecr -- linux-arm64-ecr + - windows-1809 + - windows-ltsc2022 + - linux-amd64-ecr + - linux-arm64-ecr --- kind: pipeline name: linux-amd64-heroku +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku' + environment: + CGO_ENABLED: 0 + when: + event: + - tag -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag - -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-amd64 - daemon_off: false - dockerfile: docker/heroku/Dockerfile.linux.amd64 - password: - from_secret: docker_password - repo: plugins/heroku - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + daemon_off: false + dockerfile: docker/heroku/Dockerfile.linux.amd64 + password: + from_secret: docker_password + repo: plugins/heroku + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-amd64-docker + - linux-amd64-docker --- kind: pipeline name: linux-arm64-heroku +type: vm + +pool: + use: ubuntu_arm64 platform: os: linux arch: arm64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag - -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag - -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-arm64 - daemon_off: false - dockerfile: docker/heroku/Dockerfile.linux.arm64 - password: - from_secret: docker_password - repo: plugins/heroku - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku' + environment: + CGO_ENABLED: 0 + when: + event: + - tag + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-arm64 + daemon_off: false + dockerfile: docker/heroku/Dockerfile.linux.arm64 + password: + from_secret: docker_password + repo: plugins/heroku + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-arm64-docker + - linux-arm64-docker --- kind: pipeline name: notifications-heroku +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: manifest - image: plugins/manifest - settings: - auto_tag: true - ignore_missing: true - password: - from_secret: docker_password - spec: docker/heroku/manifest.tmpl - username: - from_secret: docker_username + - name: manifest + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + password: + from_secret: docker_password + spec: docker/heroku/manifest.tmpl + username: + from_secret: docker_username trigger: ref: - - refs/heads/master - - "refs/tags/**" + - refs/heads/master + - "refs/tags/**" depends_on: -- linux-amd64-heroku -- linux-arm64-heroku + - linux-amd64-heroku + - linux-arm64-heroku --- kind: pipeline name: linux-amd64-acr +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag - -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag - -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-amd64 - daemon_off: false - dockerfile: docker/acr/Dockerfile.linux.amd64 - password: - from_secret: docker_password - repo: plugins/acr - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr' + environment: + CGO_ENABLED: 0 + when: + event: + - tag + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + daemon_off: false + dockerfile: docker/acr/Dockerfile.linux.amd64 + password: + from_secret: docker_password + repo: plugins/acr + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-amd64-docker + - linux-amd64-docker --- kind: pipeline name: linux-arm64-acr +type: vm + +pool: + use: ubuntu_arm64 platform: os: linux arch: arm64 steps: -- name: build-push - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - exclude: - - tag + - name: build-push + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr' + environment: + CGO_ENABLED: 0 + when: + event: + exclude: + - tag -- name: build-tag - image: golang:1.17.3 - commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr" - environment: - CGO_ENABLED: 0 - GO111MODULE: on - when: - event: - - tag + - name: build-tag + image: golang:1.17 + commands: + - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr' + environment: + CGO_ENABLED: 0 + when: + event: + - tag -- name: publish - image: plugins/docker:18 - settings: - auto_tag: true - auto_tag_suffix: linux-arm64 - daemon_off: false - dockerfile: docker/acr/Dockerfile.linux.arm64 - password: - from_secret: docker_password - repo: plugins/acr - username: - from_secret: docker_username - when: - event: - exclude: - - pull_request + - name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-arm64 + daemon_off: false + dockerfile: docker/acr/Dockerfile.linux.arm64 + password: + from_secret: docker_password + repo: plugins/acr + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request trigger: ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" depends_on: -- linux-arm64-docker + - linux-arm64-docker --- kind: pipeline name: notifications-acr +type: vm + +pool: + use: ubuntu platform: os: linux arch: amd64 steps: -- name: manifest - image: plugins/manifest - settings: - ignore_missing: true - password: - from_secret: docker_password - spec: docker/acr/manifest.tmpl - username: - from_secret: docker_username + - name: manifest + image: plugins/manifest + settings: + ignore_missing: true + password: + from_secret: docker_password + spec: docker/acr/manifest.tmpl + username: + from_secret: docker_username trigger: ref: - - refs/heads/master - - "refs/tags/**" + - refs/heads/master + - "refs/tags/**" depends_on: -- windows-1809-acr -- windows-1909-acr -- linux-amd64-acr -- linux-arm64-acr - -... + - windows-1809 + - windows-ltsc2022 + - linux-amd64-acr + - linux-arm64-acr diff --git a/docker/acr/Dockerfile.linux.arm b/docker/acr/Dockerfile.linux.arm deleted file mode 100644 index c989857..0000000 --- a/docker/acr/Dockerfile.linux.arm +++ /dev/null @@ -1,4 +0,0 @@ -FROM plugins/docker:linux-arm - -ADD release/linux/arm/drone-acr /bin/ -ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-acr"] diff --git a/docker/acr/Dockerfile.windows.amd64.1909 b/docker/acr/Dockerfile.windows.amd64.1909 deleted file mode 100644 index 9b94ccd..0000000 --- a/docker/acr/Dockerfile.windows.amd64.1909 +++ /dev/null @@ -1,10 +0,0 @@ -# escape=` -FROM plugins/docker:windows-1909-amd64 - -LABEL maintainer="Drone.IO Community " ` - org.label-schema.name="Drone ACR" ` - org.label-schema.vendor="Drone.IO Community" ` - org.label-schema.schema-version="1.0" - -ADD release/windows/amd64/drone-acr.exe C:/bin/drone-acr.exe -ENTRYPOINT [ "C:\\bin\\drone-acr.exe" ] diff --git a/docker/acr/Dockerfile.windows.amd64.1803 b/docker/acr/Dockerfile.windows.amd64.ltsc2022 similarity index 87% rename from docker/acr/Dockerfile.windows.amd64.1803 rename to docker/acr/Dockerfile.windows.amd64.ltsc2022 index 755fe9e..60e3ff9 100644 --- a/docker/acr/Dockerfile.windows.amd64.1803 +++ b/docker/acr/Dockerfile.windows.amd64.ltsc2022 @@ -1,5 +1,5 @@ # escape=` -FROM plugins/docker:windows-1803-amd64 +FROM plugins/docker:windows-ltsc2022-amd64 LABEL maintainer="Drone.IO Community " ` org.label-schema.name="Drone ACR" ` diff --git a/docker/acr/manifest.tmpl b/docker/acr/manifest.tmpl index c84e3c6..d3bfb93 100644 --- a/docker/acr/manifest.tmpl +++ b/docker/acr/manifest.tmpl @@ -17,18 +17,6 @@ manifests: architecture: arm64 os: linux variant: v8 - - - image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - platform: - architecture: arm - os: linux - variant: v7 - - - image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 - platform: - architecture: amd64 - os: windows - version: 1803 - image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 platform: @@ -36,14 +24,8 @@ manifests: os: windows version: 1809 - - image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64 + image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-ltsc2022-amd64 platform: architecture: amd64 os: windows - version: 1903 - - - image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 - platform: - architecture: amd64 - os: windows - version: 1909 + version: ltsc2022 diff --git a/docker/docker/Dockerfile.linux.arm b/docker/docker/Dockerfile.linux.arm deleted file mode 100644 index 38c8992..0000000 --- a/docker/docker/Dockerfile.linux.arm +++ /dev/null @@ -1,15 +0,0 @@ -FROM arm32v6/docker:19.03.8-dind - -ENV DOCKER_HOST=unix:///var/run/docker.sock - -RUN apk --update add --virtual .build-deps curl && \ - mkdir -p /etc/docker/ && \ - curl -SsL -o /etc/docker/default.json https://raw.githubusercontent.com/moby/moby/19.03/profiles/seccomp/default.json && \ - sed -i 's/SCMP_ACT_ERRNO/SCMP_ACT_TRACE/g' /etc/docker/default.json && \ - chmod 600 /etc/docker/default.json && \ - apk del .build-deps && \ - rm -rf /var/cache/apk/* && \ - rm -rf /tmp/* - -ADD release/linux/arm/drone-docker /bin/ -ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"] diff --git a/docker/docker/Dockerfile.windows.amd64.1803 b/docker/docker/Dockerfile.windows.amd64.1803 deleted file mode 100644 index 41352d7..0000000 --- a/docker/docker/Dockerfile.windows.amd64.1803 +++ /dev/null @@ -1,26 +0,0 @@ -# escape=` -FROM mcr.microsoft.com/windows/servercore:1803 as download - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV DOCKER_VERSION 18.09.1 - -RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.6-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; ` - Expand-Archive innoextract.zip -DestinationPath C:\ ; ` - Remove-Item -Path innoextract.zip - -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing -RUN /innoextract.exe dockertoolbox.exe - -FROM plugins/base:windows-1803 - -LABEL maintainer="Drone.IO Community " ` - org.label-schema.name="Drone Docker" ` - org.label-schema.vendor="Drone.IO Community" ` - org.label-schema.schema-version="1.0" - -COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll -COPY --from=download /app/docker.exe C:/bin/docker.exe -ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe -ENTRYPOINT [ "C:\\bin\\drone-docker.exe" ] diff --git a/docker/docker/Dockerfile.windows.amd64.1909 b/docker/docker/Dockerfile.windows.amd64.1909 deleted file mode 100644 index e8dc3ae..0000000 --- a/docker/docker/Dockerfile.windows.amd64.1909 +++ /dev/null @@ -1,28 +0,0 @@ -# escape=` -FROM mcr.microsoft.com/windows/servercore:1909 as download - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV DOCKER_VERSION 19.03.1 - -RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.7-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; ` - Expand-Archive innoextract.zip -DestinationPath C:\ ; ` - Remove-Item -Path innoextract.zip - -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing -RUN /innoextract.exe dockertoolbox.exe - -FROM mcr.microsoft.com/windows/nanoserver:1909 -USER ContainerAdministrator - -LABEL maintainer="Drone.IO Community " ` - org.label-schema.name="Drone Docker" ` - org.label-schema.vendor="Drone.IO Community" ` - org.label-schema.schema-version="1.0" - -RUN mkdir C:\bin -COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll -COPY --from=download /app/docker.exe C:/bin/docker.exe -ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe -ENTRYPOINT [ "C:\\bin\\drone-docker.exe" ] diff --git a/docker/docker/Dockerfile.windows.amd64.1903 b/docker/docker/Dockerfile.windows.amd64.ltsc2022 similarity index 91% rename from docker/docker/Dockerfile.windows.amd64.1903 rename to docker/docker/Dockerfile.windows.amd64.ltsc2022 index a6eadef..0274d0a 100644 --- a/docker/docker/Dockerfile.windows.amd64.1903 +++ b/docker/docker/Dockerfile.windows.amd64.ltsc2022 @@ -1,5 +1,5 @@ # escape=` -FROM mcr.microsoft.com/windows/servercore:1903 as download +FROM mcr.microsoft.com/windows/servercore:ltsc2022 as download SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -13,7 +13,7 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing RUN /innoextract.exe dockertoolbox.exe -FROM mcr.microsoft.com/windows/nanoserver:1903 +FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 USER ContainerAdministrator LABEL maintainer="Drone.IO Community " ` diff --git a/docker/docker/manifest.tmpl b/docker/docker/manifest.tmpl index c969865..ac65caf 100644 --- a/docker/docker/manifest.tmpl +++ b/docker/docker/manifest.tmpl @@ -17,36 +17,12 @@ manifests: architecture: arm64 os: linux variant: v8 - - - image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - platform: - architecture: arm - os: linux - variant: v7 - - - image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 - platform: - architecture: amd64 - os: windows - version: 1803 - image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 platform: architecture: amd64 os: windows version: 1809 - - - image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64 - platform: - architecture: amd64 - os: windows - version: 1903 - - - image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 - platform: - architecture: amd64 - os: windows - version: 1909 - image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-ltsc2022-amd64 platform: diff --git a/docker/ecr/Dockerfile.linux.arm b/docker/ecr/Dockerfile.linux.arm deleted file mode 100644 index f8dd9e3..0000000 --- a/docker/ecr/Dockerfile.linux.arm +++ /dev/null @@ -1,4 +0,0 @@ -FROM plugins/docker:linux-arm - -ADD release/linux/arm/drone-ecr /bin/ -ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-ecr"] diff --git a/docker/ecr/Dockerfile.windows.amd64.1803 b/docker/ecr/Dockerfile.windows.amd64.1803 deleted file mode 100644 index c1bbd53..0000000 --- a/docker/ecr/Dockerfile.windows.amd64.1803 +++ /dev/null @@ -1,10 +0,0 @@ -# escape=` -FROM plugins/docker:windows-1803-amd64 - -LABEL maintainer="Drone.IO Community " ` - org.label-schema.name="Drone ECR" ` - org.label-schema.vendor="Drone.IO Community" ` - org.label-schema.schema-version="1.0" - -ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe -ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ] diff --git a/docker/ecr/Dockerfile.windows.amd64.1909 b/docker/ecr/Dockerfile.windows.amd64.ltsc2022 similarity index 87% rename from docker/ecr/Dockerfile.windows.amd64.1909 rename to docker/ecr/Dockerfile.windows.amd64.ltsc2022 index ae6e96f..40bbbbb 100644 --- a/docker/ecr/Dockerfile.windows.amd64.1909 +++ b/docker/ecr/Dockerfile.windows.amd64.ltsc2022 @@ -1,5 +1,5 @@ # escape=` -FROM plugins/docker:windows-1909-amd64 +FROM plugins/docker:windows-ltsc2022-amd64 LABEL maintainer="Drone.IO Community " ` org.label-schema.name="Drone ECR" ` diff --git a/docker/ecr/manifest.tmpl b/docker/ecr/manifest.tmpl index 36bde04..a97f75d 100644 --- a/docker/ecr/manifest.tmpl +++ b/docker/ecr/manifest.tmpl @@ -17,18 +17,6 @@ manifests: architecture: arm64 os: linux variant: v8 - - - image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - platform: - architecture: arm - os: linux - variant: v7 - - - image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 - platform: - architecture: amd64 - os: windows - version: 1803 - image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 platform: @@ -36,14 +24,8 @@ manifests: os: windows version: 1809 - - image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64 + image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-ltsc2022-amd64 platform: architecture: amd64 os: windows - version: 1903 - - - image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 - platform: - architecture: amd64 - os: windows - version: 1909 + version: ltsc2022 diff --git a/docker/gcr/Dockerfile.linux.arm b/docker/gcr/Dockerfile.linux.arm deleted file mode 100644 index 718ce0f..0000000 --- a/docker/gcr/Dockerfile.linux.arm +++ /dev/null @@ -1,4 +0,0 @@ -FROM plugins/docker:linux-arm - -ADD release/linux/arm/drone-gcr /bin/ -ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-gcr"] diff --git a/docker/gcr/Dockerfile.windows.amd64.1909 b/docker/gcr/Dockerfile.windows.amd64.1909 deleted file mode 100644 index faf2274..0000000 --- a/docker/gcr/Dockerfile.windows.amd64.1909 +++ /dev/null @@ -1,10 +0,0 @@ -# escape=` -FROM plugins/docker:windows-1909-amd64 - -LABEL maintainer="Drone.IO Community " ` - org.label-schema.name="Drone GCR" ` - org.label-schema.vendor="Drone.IO Community" ` - org.label-schema.schema-version="1.0" - -ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe -ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ] diff --git a/docker/gcr/Dockerfile.windows.amd64.1803 b/docker/gcr/Dockerfile.windows.amd64.ltsc2022 similarity index 87% rename from docker/gcr/Dockerfile.windows.amd64.1803 rename to docker/gcr/Dockerfile.windows.amd64.ltsc2022 index fc03bb4..baf39c4 100644 --- a/docker/gcr/Dockerfile.windows.amd64.1803 +++ b/docker/gcr/Dockerfile.windows.amd64.ltsc2022 @@ -1,5 +1,5 @@ # escape=` -FROM plugins/docker:windows-1803-amd64 +FROM plugins/docker:windows-ltsc2022-amd64 LABEL maintainer="Drone.IO Community " ` org.label-schema.name="Drone GCR" ` diff --git a/docker/gcr/manifest.tmpl b/docker/gcr/manifest.tmpl index 1c83f07..c2a60c8 100644 --- a/docker/gcr/manifest.tmpl +++ b/docker/gcr/manifest.tmpl @@ -17,18 +17,6 @@ manifests: architecture: arm64 os: linux variant: v8 - - - image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - platform: - architecture: arm - os: linux - variant: v7 - - - image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 - platform: - architecture: amd64 - os: windows - version: 1803 - image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 platform: @@ -36,8 +24,8 @@ manifests: os: windows version: 1809 - - image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 + image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-ltsc2022-amd64 platform: architecture: amd64 os: windows - version: 1909 + version: ltsc2022 diff --git a/docker/heroku/Dockerfile.linux.arm b/docker/heroku/Dockerfile.linux.arm deleted file mode 100644 index b233cca..0000000 --- a/docker/heroku/Dockerfile.linux.arm +++ /dev/null @@ -1,4 +0,0 @@ -FROM plugins/docker:linux-arm - -ADD release/linux/arm/drone-heroku /bin/ -ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-heroku"] diff --git a/docker/heroku/manifest.tmpl b/docker/heroku/manifest.tmpl index 28ed9a5..2c8edfd 100644 --- a/docker/heroku/manifest.tmpl +++ b/docker/heroku/manifest.tmpl @@ -17,9 +17,3 @@ manifests: architecture: arm64 os: linux variant: v8 - - - image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - platform: - architecture: arm - os: linux - variant: v7 diff --git a/pipeline.libsonnet b/pipeline.libsonnet deleted file mode 100644 index 08f102f..0000000 --- a/pipeline.libsonnet +++ /dev/null @@ -1,206 +0,0 @@ -local windows_pipe = '\\\\\\\\.\\\\pipe\\\\docker_engine'; -local windows_pipe_volume = 'docker_pipe'; -local test_pipeline_name = 'testing'; - -local windows(os) = os == 'windows'; - -local golang_image(os, version) = - 'golang:' + '1.13' + if windows(os) then '-windowsservercore-' + version else ''; - -{ - test(os='linux', arch='amd64', version=''):: - local is_windows = windows(os); - local golang = golang_image(os, version); - local volumes = if is_windows then [{name: 'gopath', path: 'C:\\\\gopath'}] else [{name: 'gopath', path: '/go',}]; - { - kind: 'pipeline', - name: test_pipeline_name, - platform: { - os: os, - arch: arch, - version: if std.length(version) > 0 then version, - }, - steps: [ - { - name: 'vet', - image: golang, - pull: 'always', - environment: { - GO111MODULE: 'on', - }, - commands: [ - 'go vet ./...', - ], - volumes: volumes, - }, - { - name: 'test', - image: golang, - pull: 'always', - environment: { - GO111MODULE: 'on', - }, - commands: [ - 'go test -cover ./...', - ], - volumes: volumes, - }, - ], - trigger: { - ref: [ - 'refs/heads/master', - 'refs/tags/**', - 'refs/pull/**', - ], - }, - volumes: [{name: 'gopath', temp: {}}] - }, - - build(name, os='linux', arch='amd64', version=''):: - local is_windows = windows(os); - local tag = if is_windows then os + '-' + version else os + '-' + arch; - local file_suffix = std.strReplace(tag, '-', '.'); - local volumes = if is_windows then [{ name: windows_pipe_volume, path: windows_pipe }] else []; - local golang = golang_image(os, version); - local plugin_repo = 'plugins/' + name; - local extension = if is_windows then '.exe' else ''; - local depends_on = if name == 'docker' then [test_pipeline_name] else [tag + '-docker']; - { - kind: 'pipeline', - name: tag + '-' + name, - platform: { - os: os, - arch: arch, - version: if std.length(version) > 0 then version, - }, - steps: [ - { - name: 'build-push', - image: golang, - pull: 'always', - environment: { - CGO_ENABLED: '0', - GO111MODULE: 'on', - }, - commands: [ - 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/' + os + '/' + arch + '/drone-' + name + extension + ' ./cmd/drone-' + name, - ], - when: { - event: { - exclude: ['tag'], - }, - }, - }, - { - name: 'build-tag', - image: golang, - pull: 'always', - environment: { - CGO_ENABLED: '0', - GO111MODULE: 'on', - }, - commands: [ - 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/' + os + '/' + arch + '/drone-' + name + extension + ' ./cmd/drone-' + name, - ], - when: { - event: ['tag'], - }, - }, - if name == "docker" then { - name: 'executable', - image: golang, - pull: 'always', - commands: [ - './release/' + os + '/' + arch + '/drone-' + name + extension + ' --help', - ], - }, - { - name: 'dryrun', - image: 'plugins/docker:' + tag, - pull: 'always', - settings: { - dry_run: true, - tags: tag, - dockerfile: 'docker/'+ name +'/Dockerfile.' + file_suffix, - daemon_off: if is_windows then 'true' else 'false', - repo: plugin_repo, - username: { from_secret: 'docker_username' }, - password: { from_secret: 'docker_password' }, - }, - volumes: if std.length(volumes) > 0 then volumes, - when: { - event: ['pull_request'], - }, - }, - { - name: 'publish', - image: 'plugins/docker:' + tag, - pull: 'always', - settings: { - auto_tag: true, - auto_tag_suffix: tag, - daemon_off: if is_windows then 'true' else 'false', - dockerfile: 'docker/' + name + '/Dockerfile.' + file_suffix, - repo: plugin_repo, - username: { from_secret: 'docker_username' }, - password: { from_secret: 'docker_password' }, - }, - volumes: if std.length(volumes) > 0 then volumes, - when: { - event: { - exclude: ['pull_request'], - }, - }, - }, - ], - trigger: { - ref: [ - 'refs/heads/master', - 'refs/tags/**', - 'refs/pull/**', - ], - }, - depends_on: depends_on, - volumes: if is_windows then [{ name: windows_pipe_volume, host: { path: windows_pipe } }], - }, - - notifications(name, os='linux', arch='amd64', version='', depends_on=[]):: - { - kind: 'pipeline', - name: 'notifications-' + name, - platform: { - os: os, - arch: arch, - version: if std.length(version) > 0 then version, - }, - steps: [ - { - name: 'manifest', - image: 'plugins/manifest', - pull: 'always', - settings: { - username: { from_secret: 'docker_username' }, - password: { from_secret: 'docker_password' }, - spec: 'docker/' + name + '/manifest.tmpl', - ignore_missing: true, - auto_tag: true, - }, - }, - { - name: 'microbadger', - image: 'plugins/webhook', - pull: 'always', - settings: { - urls: { from_secret: 'microbadger_' + name }, - }, - }, - ], - depends_on: [x + '-' + name for x in depends_on], - trigger: { - ref: [ - 'refs/heads/master', - 'refs/tags/**', - ], - }, - }, -}