2019-09-01 21:15:08 +02:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
2015-02-13 10:01:28 +01:00
|
|
|
|
2019-09-01 21:15:08 +02:00
|
|
|
steps:
|
2021-08-26 16:34:52 +02:00
|
|
|
- name: test
|
2022-07-05 14:53:47 +02:00
|
|
|
image: golang:1.18
|
2021-08-26 16:34:52 +02:00
|
|
|
commands:
|
2023-08-11 14:32:12 +02:00
|
|
|
- go test ./...
|
2021-08-26 16:34:52 +02:00
|
|
|
|
2019-09-01 21:15:08 +02:00
|
|
|
- name: build
|
2022-07-05 14:53:47 +02:00
|
|
|
image: golang:1.18
|
2019-09-01 21:15:08 +02:00
|
|
|
commands:
|
2023-08-11 14:32:12 +02:00
|
|
|
- sh .drone.sh
|
|
|
|
depends_on:
|
|
|
|
- test
|
2017-05-22 15:18:17 +02:00
|
|
|
|
2019-09-01 21:15:08 +02:00
|
|
|
- name: publish_latest
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2017-09-13 00:28:13 +02:00
|
|
|
repo: drone/cli
|
2019-09-01 21:15:08 +02:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2018-02-20 19:58:56 +01:00
|
|
|
auto_tag: true
|
2019-09-01 21:15:08 +02:00
|
|
|
when:
|
|
|
|
event: [push, tag]
|
2023-08-11 14:32:12 +02:00
|
|
|
depends_on:
|
|
|
|
- build
|
2018-02-20 19:58:56 +01:00
|
|
|
|
2019-09-01 21:15:08 +02:00
|
|
|
- name: publish_alpine
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2018-02-20 19:58:56 +01:00
|
|
|
repo: drone/cli
|
2019-09-01 21:15:08 +02:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2018-02-20 19:58:56 +01:00
|
|
|
auto_tag: true
|
|
|
|
auto_tag_suffix: alpine
|
|
|
|
dockerfile: Dockerfile.alpine
|
2019-09-01 21:15:08 +02:00
|
|
|
when:
|
|
|
|
event: [push, tag]
|
2023-08-11 14:32:12 +02:00
|
|
|
depends_on:
|
|
|
|
- build
|
2017-09-13 00:28:13 +02:00
|
|
|
|
2019-09-01 21:15:08 +02:00
|
|
|
- name: publish_linux_arm
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2018-02-20 20:12:02 +01:00
|
|
|
repo: drone/cli
|
2019-09-01 21:15:08 +02:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2018-02-20 20:12:02 +01:00
|
|
|
auto_tag: true
|
2018-02-21 00:20:59 +01:00
|
|
|
auto_tag_suffix: linux-arm
|
|
|
|
dockerfile: Dockerfile.linux.arm
|
2019-09-01 21:15:08 +02:00
|
|
|
when:
|
|
|
|
event: [push, tag]
|
2023-08-11 14:32:12 +02:00
|
|
|
depends_on:
|
|
|
|
- build
|
2018-02-20 20:12:02 +01:00
|
|
|
|
2019-09-01 21:15:08 +02:00
|
|
|
- name: publish_linux_arm64
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2018-02-20 20:12:02 +01:00
|
|
|
repo: drone/cli
|
2019-09-01 21:15:08 +02:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2018-02-20 20:12:02 +01:00
|
|
|
auto_tag: true
|
2018-02-21 00:20:59 +01:00
|
|
|
auto_tag_suffix: linux-arm64
|
|
|
|
dockerfile: Dockerfile.linux.arm64
|
2019-09-01 21:15:08 +02:00
|
|
|
when:
|
|
|
|
event: [push, tag]
|
2023-08-11 14:32:12 +02:00
|
|
|
depends_on:
|
|
|
|
- build
|
2018-02-20 20:12:02 +01:00
|
|
|
|
2020-03-26 22:43:43 +01:00
|
|
|
- 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]
|
2023-08-11 14:32:12 +02:00
|
|
|
depends_on:
|
|
|
|
- build
|
2020-03-26 22:43:43 +01:00
|
|
|
|
2019-09-01 21:15:08 +02:00
|
|
|
- name: release
|
|
|
|
image: plugins/github-release
|
|
|
|
settings:
|
2017-05-22 15:18:17 +02:00
|
|
|
files:
|
|
|
|
- release/drone_*.tar.gz
|
|
|
|
- release/drone_checksums.txt
|
2019-09-01 21:15:08 +02:00
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
|
|
|
when:
|
|
|
|
event: tag
|
2023-08-11 14:32:12 +02:00
|
|
|
depends_on:
|
|
|
|
- build
|
2023-08-11 14:16:39 +02:00
|
|
|
|
|
|
|
- name: manifest
|
2023-08-11 15:43:41 +02:00
|
|
|
image: plugins/manifest
|
2023-08-11 14:16:39 +02:00
|
|
|
settings:
|
|
|
|
auto_tag: true
|
|
|
|
ignore_missing: true
|
2023-08-11 15:09:34 +02:00
|
|
|
spec: docker/manifest.tmpl
|
2023-08-11 14:16:39 +02:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2023-08-11 14:32:12 +02:00
|
|
|
when:
|
|
|
|
event: [push, tag]
|
2023-08-11 14:16:39 +02:00
|
|
|
depends_on:
|
2023-08-11 14:32:12 +02:00
|
|
|
- publish_latest
|
|
|
|
- publish_alpine
|
|
|
|
- publish_linux_arm
|
|
|
|
- publish_linux_arm64
|
|
|
|
- publish_linux_ppc64le
|
2023-08-11 14:16:39 +02:00
|
|
|
|