-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
90 lines (81 loc) · 1.79 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
kind: pipeline
type: docker
name: devel
steps:
- name: binaries
image: docker.io/golang:1.19-alpine
commands:
- apk add --no-cache build-base
- GOOS=linux GOARCH=amd64 go build -v -trimpath -o build/linux-amd64 .
- GOOS=linux GOARCH=arm64 go build -v -trimpath -o build/linux-arm64 .
- name: amd64 image
image: plugins/docker:linux-amd64
settings:
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_TOKEN
dockerfile: ./Dockerfile.linux-amd64
repo: trslimey/drone-external-config
tags:
- linux-amd64-devel
depends_on:
- binaries
#- name: arm64 image
# image: plugins/docker:linux-arm64
# settings:
# username:
# from_secret: DOCKER_USER
# password:
# from_secret: DOCKER_TOKEN
# dockerfile: ./Dockerfile.linux-arm64
# repo: trslimey/drone-external-config
# tags:
# - linux-arm64-devel
# depends_on:
# - binaries
- name: devel docker manifest
image: plugins/manifest
settings:
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_TOKEN
target: trslimey/drone-external-config:latest-devel
template: trslimey/drone-external-config:OS-ARCH-devel
platforms:
- linux/amd64
- linux/arm64
ignore_missing: true
depends_on:
- amd64 image
trigger:
event:
- push
branch:
- master
---
kind: pipeline
type: docker
name: prod
clone:
disable: true
steps:
- name: prod docker manifest
image: plugins/manifest
settings:
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_TOKEN
target: trslimey/drone-external-config:latest
template: trslimey/drone-external-config:OS-ARCH-devel
platforms:
- linux/amd64
- linux/arm64
ignore_missing: true
trigger:
event:
- promote
target:
- prod