-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
238 lines (212 loc) · 4.82 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
---
kind: pipeline
type: docker
name: container-v4
platform:
os: linux
arch: amd64
steps:
- name: security-build
image: docker.io/owncloudci/drone-docker-buildx:4
settings:
context: 4/
dockerfile: 4/Dockerfile
output: type=oci,dest=oci/${DRONE_REPO_NAME},tar=false
repo: owncloudops/${DRONE_REPO_NAME}
- name: security-scan
image: ghcr.io/aquasecurity/trivy
commands:
- trivy -v
- trivy image --input oci/${DRONE_REPO_NAME}
environment:
TRIVY_EXIT_CODE: 1
TRIVY_IGNORE_UNFIXED: True
TRIVY_NO_PROGRESS: True
TRIVY_SEVERITY: HIGH,CRITICAL
TRIVY_TIMEOUT: 1m
TRIVY_SKIP_FILES: /usr/local/bin/gomplate
depends_on:
- security-build
- name: publish-dockerhub
image: docker.io/owncloudci/drone-docker-buildx:4
settings:
context: 4/
dockerfile: 4/Dockerfile
auto_tag: True
password:
from_secret: docker_password
repo: owncloudops/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/tags/**
depends_on:
- security-scan
- name: publish-quay
image: docker.io/owncloudci/drone-docker-buildx:4
settings:
context: 4/
dockerfile: 4/Dockerfile
auto_tag: True
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/owncloudops/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/tags/**
depends_on:
- security-scan
trigger:
ref:
- refs/tags/v4*
- refs/pull/**
---
kind: pipeline
type: docker
name: container-v5
platform:
os: linux
arch: amd64
steps:
- name: security-build
image: docker.io/owncloudci/drone-docker-buildx:4
settings:
context: 5/
dockerfile: 5/Dockerfile
output: type=oci,dest=oci/${DRONE_REPO_NAME},tar=false
repo: owncloudops/${DRONE_REPO_NAME}
- name: security-scan
image: ghcr.io/aquasecurity/trivy
commands:
- trivy -v
- trivy image --input oci/${DRONE_REPO_NAME}
environment:
TRIVY_EXIT_CODE: 1
TRIVY_IGNORE_UNFIXED: True
TRIVY_NO_PROGRESS: True
TRIVY_SEVERITY: HIGH,CRITICAL
TRIVY_TIMEOUT: 1m
TRIVY_SKIP_FILES: /usr/local/bin/gomplate
depends_on:
- security-build
- name: publish-dockerhub
image: docker.io/owncloudci/drone-docker-buildx:4
settings:
context: 5/
dockerfile: 5/Dockerfile
auto_tag: True
password:
from_secret: docker_password
repo: owncloudops/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- security-scan
- name: publish-quay
image: docker.io/owncloudci/drone-docker-buildx:4
settings:
context: 5/
dockerfile: 5/Dockerfile
auto_tag: True
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/owncloudops/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- security-scan
trigger:
ref:
- refs/heads/main
- refs/tags/v5*
- refs/pull/**
---
kind: pipeline
type: docker
name: release
platform:
os: linux
arch: amd64
steps:
- name: changelog
image: quay.io/thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
- cat CHANGELOG.md
- name: release
image: docker.io/plugins/github-release
settings:
api_key:
from_secret: github_token
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
trigger:
ref:
- refs/tags/**
depends_on:
- container-v4
- container-v5
---
kind: pipeline
type: docker
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: pushrm-dockerhub
image: docker.io/chko/docker-pushrm:1
environment:
DOCKER_PASS:
from_secret: docker_password
DOCKER_USER:
from_secret: docker_username
PUSHRM_FILE: README.md
PUSHRM_TARGET: owncloudops/${DRONE_REPO_NAME}
when:
status:
- success
- name: pushrm-quay
image: docker.io/chko/docker-pushrm:1
environment:
APIKEY__QUAY_IO:
from_secret: quay_token
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/owncloudops/${DRONE_REPO_NAME}
when:
status:
- success
- name: notify
image: docker.io/plugins/slack
settings:
channel:
from_secret: rocketchat_chat_channel
webhook:
from_secret: rocketchat_chat_webhook
when:
status:
- failure
trigger:
ref:
- refs/heads/main
- refs/tags/**
status:
- success
- failure
depends_on:
- release