forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 24
/
.drone.yml
109 lines (105 loc) · 2.95 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
---
kind: pipeline
name: arm64
platform:
os: linux
arch: arm64
steps:
- name: email notification on start
image: mashirozx/drone-email:latest-arm64
failure: ignore
settings:
host:
from_secret: smtp_host
port:
from_secret: smtp_port
username:
from_secret: smtp_username
password:
from_secret: smtp_password
from.address:
from_secret: smtp_from_address
from.name:
from_secret: smtp_from_name
recipients:
from_secret: smtp_recipients
subject: >
{{repo.owner}}/{{repo.name}}:${DRONE_COMMIT_BRANCH} arm64 build #${DRONE_BUILD_NUMBER} start
body: >
${DRONE_COMMIT_MESSAGE}<br /><br />
Git repo: {{repo.owner}}/{{repo.name}}<br />
Git branch: ${DRONE_COMMIT_BRANCH}<br />
Git hash: <a href="${DRONE_COMMIT_LINK}" target="_blank">${DRONE_COMMIT_SHA}</a><br />
Git author: ${DRONE_COMMIT_AUTHOR_NAME} (${DRONE_COMMIT_AUTHOR})<br />
<br />View CI detail: {{build.link}}
<br /><br />
Drone CI ${DRONE_SYSTEM_VERSION}
when:
branch:
- main
event:
- push
- tag
- name: build arm64 image
image: plugins/docker
settings:
repo:
from_secret: docker_repo
tags:
- latest-arm64
- sha-${DRONE_COMMIT_SHA:0:8}-arm64
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: Dockerfile.slim
squash: true
build_args:
- GIT_COMMIT=${DRONE_COMMIT_SHA}
when:
branch:
- main
event:
- push
- name: email notification on complete
image: mashirozx/drone-email:latest-arm64
failure: ignore
settings:
host:
from_secret: smtp_host
port:
from_secret: smtp_port
username:
from_secret: smtp_username
password:
from_secret: smtp_password
from.address:
from_secret: smtp_from_address
from.name:
from_secret: smtp_from_name
recipients:
from_secret: smtp_recipients
subject: >
{{#success build.status}}
{{repo.owner}}/{{repo.name}}:${DRONE_COMMIT_BRANCH} arm64 build #${DRONE_BUILD_NUMBER} succeeded
{{else}}
{{repo.owner}}/{{repo.name}}:${DRONE_COMMIT_BRANCH} arm64 build #${DRONE_BUILD_NUMBER} failed
{{/success}}
body: >
${DRONE_COMMIT_MESSAGE}<br /><br />
Git repo: {{repo.owner}}/{{repo.name}}<br />
Git branch: ${DRONE_COMMIT_BRANCH}<br />
Git hash: <a href="${DRONE_COMMIT_LINK}" target="_blank">${DRONE_COMMIT_SHA}</a><br />
Git author: ${DRONE_COMMIT_AUTHOR_NAME} (${DRONE_COMMIT_AUTHOR})<br />
<br />View CI detail: {{build.link}}
<br /><br />
Drone CI ${DRONE_SYSTEM_VERSION}
when:
branch:
- main
event:
- push
- tag
status:
- success
- failure