1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-22 17:01:58 +01:00

parallelize build and use native infra

This commit is contained in:
dependabot-ci 2023-09-06 12:31:47 +01:00
parent 6dc4bb9876
commit 823cbf0c35
4 changed files with 51 additions and 89 deletions

@ -18,7 +18,7 @@ steps:
depends_on: depends_on:
- test - test
- name: publish_latest - name: publish linux
image: plugins/docker image: plugins/docker
settings: settings:
repo: drone/cli repo: drone/cli
@ -32,23 +32,33 @@ steps:
event: [push, tag] event: [push, tag]
depends_on: depends_on:
- build - build
- name: publish_alpine - name: release
image: plugins/docker image: plugins/github-release
settings: settings:
repo: drone/cli files:
username: - release/drone_*.tar.gz
from_secret: docker_username - release/drone_checksums.txt
password: api_key:
from_secret: docker_password from_secret: github_token
auto_tag: true
auto_tag_suffix: alpine-amd64
dockerfile: Dockerfile.alpine
when: when:
event: [push, tag] event: tag
depends_on: depends_on:
- build - 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 - name: publish_linux_arm
image: plugins/docker image: plugins/docker
settings: settings:
@ -83,51 +93,31 @@ steps:
depends_on: depends_on:
- build - build
- name: publish_linux_ppc64le depends_on:
image: plugins/docker - default
settings:
repo: drone/cli ---
username: kind: pipeline
from_secret: docker_username type: vm
password: name: manifest
from_secret: docker_password
auto_tag: true
auto_tag_suffix: linux-ppc64le
dockerfile: Dockerfile.linux.ppc64le
when:
event: [push, tag]
depends_on:
- build
- name: release pool:
image: plugins/github-release use: ubuntu
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
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

@ -1,7 +0,0 @@
FROM alpine:3.7
RUN apk add --no-cache ca-certificates
COPY release/linux/amd64/drone /bin/
ENTRYPOINT ["/bin/drone"]

@ -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"]

@ -11,25 +11,15 @@ manifests:
platform: platform:
architecture: amd64 architecture: amd64
os: linux 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 image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v6 variant: v7
- -
image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
-
image: drone/cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-ppc64le
platform:
architecture: ppc64le
os: linux