-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
232 lines (214 loc) · 5.48 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
---
kind: pipeline
type: kubernetes
name: latest
node_selector:
kubernetes.io/arch: amd64
steps:
- name: build
commands:
- make latexmk/index.pdf
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
requests:
cpu: 250
memory: 500M
limits:
cpu: 500
memory: 750M
- name: push-fhtrier
depends_on:
- build
image: docker.io/appleboy/drone-scp:1.6.2
settings:
host: ssh.hochschule-trier.de
user:
from_secret: ssh_user_fh-trier
key:
from_secret: ssh_key
port: 22
command_timeout: 2m
target:
- /dozenten/peschm/tgdb_ws1819
source:
- index.pdf
- sql/schema_01.sql
- sql/sqlplus-settings.sql
when:
branch:
- master
repo:
- fh-trier/tgdb_ws1819
event:
- push
- cron
- name: push-nextcloud
commands:
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file index.pdf --location https://nextcloud.cryptic.systems/remote.php/dav/files/$WEBDAV_USER/Dokumente/Studium/Fachschaftdaten/DB_1_-_Grundlagen_Datenbanken/Tutorien/Tutorium_WS1819/Tutorium_WS1819.pdf
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file sql/schema_01.sql --location https://nextcloud.cryptic.systems/remote.php/dav/files/$WEBDAV_USER/Dokumente/Studium/Fachschaftdaten/DB_1_-_Grundlagen_Datenbanken/Tutorien/Tutorium_WS1819/schema.sql
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file sql/sqlplus-settings.sql --location https://nextcloud.cryptic.systems/remote.php/dav/files/$WEBDAV_USER/Dokumente/Studium/Fachschaftdaten/DB_1_-_Grundlagen_Datenbanken/Tutorien/Tutorium_WS1819/sqlplus-settings.sql
depends_on:
- build
environment:
WEBDAV_USER:
from_secret: webdav_username
WEBDAV_PASSWORD:
from_secret: webdav_password
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
limits:
cpu: 150
memory: 150M
when:
repo:
- fh-trier/tgdb_ws1819
event:
- push
- cron
- name: email-notification
depends_on:
- push-fhtrier
- push-nextcloud
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger:
event:
exclude:
- tag
---
kind: pipeline
type: kubernetes
name: release
node_selector:
kubernetes.io/arch: amd64
steps:
- name: build
commands:
- make latexmk/index.pdf
environment:
VERSION: ${DRONE_TAG}
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
requests:
cpu: 250
memory: 500M
limits:
cpu: 500
memory: 750M
- name: push-nextcloud
commands:
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file index.pdf --location https://nextcloud.cryptic.systems/remote.php/dav/files/$WEBDAV_USER/Dokumente/Studium/Fachschaftdaten/DB_1_-_Grundlagen_Datenbanken/Tutorien/Tutorium_WS1819/Tutorium_WS1819_${DRONE_TAG}.pdf
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file sql/schema_01.sql --location https://nextcloud.cryptic.systems/remote.php/dav/files/$WEBDAV_USER/Dokumente/Studium/Fachschaftdaten/DB_1_-_Grundlagen_Datenbanken/Tutorien/Tutorium_WS1819/schema_${DRONE_TAG}.sql
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file sql/sqlplus-settings.sql --location https://nextcloud.cryptic.systems/remote.php/dav/files/$WEBDAV_USER/Dokumente/Studium/Fachschaftdaten/DB_1_-_Grundlagen_Datenbanken/Tutorien/Tutorium_WS1819/sqlplus-settings_${DRONE_TAG}.sql
environment:
WEBDAV_USER:
from_secret: webdav_username
WEBDAV_PASSWORD:
from_secret: webdav_password
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
limits:
cpu: 150
memory: 150M
- name: push-gitea
image: docker.io/plugins/gitea-release:latest
resources:
limits:
cpu: 150
memory: 150M
settings:
base_url: https://git.cryptic.systems
api_key:
from_secret: gitea_token
files:
- index.pdf
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
- name: email-notification
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger:
event:
- tag
repo:
- fh-trier/tgdb_ws1819
---
kind: pipeline
type: kubernetes
name: sync
node_selector:
kubernetes.io/arch: amd64
steps:
- name: github
image: docker.io/appleboy/drone-git-push:latest
resources:
limits:
cpu: 150
memory: 150M
settings:
branch: master
remote: ssh://[email protected]/fh-trier/tgdb_ws1819.git
force: true
ssh_key:
from_secret: ssh_key
- name: email-notification
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger:
event:
- push
repo:
- fh-trier/tgdb_ws1819