diff --git a/.drone.yml b/.drone.yml index 1e90d54..b434189 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,7 +18,7 @@ steps: depends_on: - test -- name: publish_latest +- name: publish linux image: plugins/docker settings: repo: drone/cli @@ -32,23 +32,33 @@ steps: event: [push, tag] depends_on: - build - -- name: publish_alpine - image: plugins/docker + +- name: release + image: plugins/github-release settings: - repo: drone/cli - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - auto_tag_suffix: alpine-amd64 - dockerfile: Dockerfile.alpine + files: + - release/drone_*.tar.gz + - release/drone_checksums.txt + api_key: + from_secret: github_token when: - event: [push, tag] + event: tag depends_on: - build +--- +kind: pipeline +type: vm +name: arm + +pool: + use: ubuntu_arm64 + +steps: +- name: build + image: golang:1.18 + commands: + - sh .drone.sh - name: publish_linux_arm image: plugins/docker settings: @@ -83,51 +93,31 @@ steps: depends_on: - build -- name: publish_linux_ppc64le - image: plugins/docker - settings: - repo: drone/cli - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - auto_tag_suffix: linux-ppc64le - dockerfile: Dockerfile.linux.ppc64le - when: - event: [push, tag] - depends_on: - - build +depends_on: + - default + +--- +kind: pipeline +type: vm +name: manifest -- name: release - image: plugins/github-release - settings: - files: - - release/drone_*.tar.gz - - release/drone_checksums.txt - api_key: - from_secret: github_token - when: - event: tag - depends_on: - - build - -- name: manifest - image: plugins/manifest - settings: - auto_tag: true - ignore_missing: true - spec: docker/manifest.tmpl - username: - from_secret: docker_username - password: - from_secret: docker_password - when: - event: [push, tag] - depends_on: - - publish_latest - - publish_alpine - - publish_linux_arm - - publish_linux_arm64 - - publish_linux_ppc64le +pool: + use: ubuntu +steps: + - name: manifest + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + spec: docker/manifest.tmpl + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: [push, tag] + +depends_on: + - default + - arm diff --git a/Dockerfile.alpine b/Dockerfile.alpine deleted file mode 100644 index 3f91a12..0000000 --- a/Dockerfile.alpine +++ /dev/null @@ -1,7 +0,0 @@ -FROM alpine:3.7 - -RUN apk add --no-cache ca-certificates - -COPY release/linux/amd64/drone /bin/ - -ENTRYPOINT ["/bin/drone"] diff --git a/Dockerfile.linux.ppc64le b/Dockerfile.linux.ppc64le deleted file mode 100644 index dfd2e2e..0000000 --- a/Dockerfile.linux.ppc64le +++ /dev/null @@ -1,11 +0,0 @@ -FROM amd64/alpine:3.17 as alpine -RUN apk add -U --no-cache ca-certificates - -FROM amd64/alpine:3.17 -ENV GODEBUG netdns=go -COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ - -COPY release/linux/ppc64le/drone /bin/ - -ENTRYPOINT ["/bin/drone"] - diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl index e44bd55..177da45 100644 --- a/docker/manifest.tmpl +++ b/docker/manifest.tmpl @@ -11,25 +11,15 @@ manifests: platform: architecture: amd64 os: linux - - - image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}alpine-amd64 - platform: - architecture: amd64 - os: linux - image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm platform: architecture: arm os: linux - variant: v6 + variant: v7 - image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 platform: architecture: arm64 os: linux - variant: v8 - - - image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-ppc64le - platform: - architecture: ppc64le - os: linux + variant: v8 \ No newline at end of file