forked from walkero-gr/iGame
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
253 lines (230 loc) · 5.57 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
kind: pipeline
type: docker
name: drone-agents-poweron
clone:
disable: true
steps:
- name: drone-agents-poweron
image: walkero/hcloud:1.30
environment:
HCLOUD_TOKEN:
from_secret: HCLOUD_TOKEN
commands:
- hcloud server poweron drone-agents
trigger:
branch:
include:
- master
- develop
event:
include:
- push
- pull_request
- tag
---
kind: pipeline
type: docker
name: compile-tests
workspace:
path: /drone/src
steps:
- name: compile-m68k
pull: always
image: walkero/docker4amigavbcc:latest-m68k
commands:
- make -f Makefile.docker CPU=000
- make -f Makefile.docker CPU=030
- make -f Makefile.docker CPU=040
- make -f Makefile.docker CPU=060
- name: compile-os4
pull: always
image: walkero/docker4amigavbcc:latest-ppc
commands:
- make -f Makefile.docker CPU=OS4
- name: compile-mos
pull: always
image: walkero/docker4amigavbcc:latest-mos
commands:
- make -f Makefile.docker CPU=MOS
- name: create-release-lha
image: walkero/docker4amigavbcc:latest-m68k
commands:
- make -f Makefile.docker release
depends_on:
- compile-m68k
- compile-os4
- compile-mos
- name: Prepare test release
image: walkero/lha-on-docker:latest
environment:
OS4DEPOT_PASSPHRASE:
from_secret: OS4DEPOT_PASSPHRASE
commands:
- mkdir test-release
- ls -la ./
- cp iGame--$(date +'%Y%m%d').lha ./test-release/iGame-$(date +'%Y%m%d%H%M').lha
- sed -i "s/VERSION_TAG/nightly-$(date +'%Y%m%d%H%M')/" ./aminet.readme
- sed -i "s/VERSION_TAG/nightly-$(date +'%Y%m%d%H%M')/" ./os4depot.readme
- sed -i "s/OS4DEPOT_PASSPHRASE/$OS4DEPOT_PASSPHRASE/" ./os4depot.readme
- cp ./os4depot.readme ./test-release/os4depot.readme
- cp ./aminet.readme ./test-release/aminet.readme
- ls -la ./test-release
depends_on:
- create-release-lha
# - name: Upload to TEST FTP
# image: cschlosser/drone-ftps
# environment:
# FTP_USERNAME:
# from_secret: TESTFTP_USERNAME
# FTP_PASSWORD:
# from_secret: TESTFTP_PASSWORD
# PLUGIN_HOSTNAME: mediavault.amiga-projects.net:21
# PLUGIN_SRC_DIR: /test-release
# PLUGIN_DEST_DIR: ./web/betas
# PLUGIN_SECURE: "false"
# PLUGIN_VERIFY: "false"
# PLUGIN_CLEAN_DIR: "false"
# depends_on:
# - Prepare test release
trigger:
branch:
include:
- master
- develop
event:
include:
- push
- pull_request
depends_on:
- drone-agents-poweron
node:
agents: builders
---
kind: pipeline
type: docker
name: compile-release-bytag
workspace:
path: /drone/src
steps:
- name: compile-m68k
pull: always
image: walkero/docker4amigavbcc:latest-m68k
commands:
- make -f Makefile.docker CPU=000
- make -f Makefile.docker CPU=030
- make -f Makefile.docker CPU=040
- make -f Makefile.docker CPU=060
- name: compile-os4
pull: always
image: walkero/docker4amigavbcc:latest-ppc
commands:
- make -f Makefile.docker CPU=OS4
- name: compile-mos
pull: always
image: walkero/docker4amigavbcc:latest-mos
commands:
- make -f Makefile.docker CPU=MOS
- name: Create release
image: walkero/docker4amigavbcc:latest-m68k
commands:
- make -f Makefile.docker release
depends_on:
- compile-m68k
- compile-os4
- compile-mos
- name: deploy-on-repo
image: plugins/github-release
settings:
api_key:
from_secret: GITHUB_RELEASE_API_KEY
files:
- "iGame-*.lha"
title: "iGame release ${DRONE_TAG}"
depends_on:
- Create release
- name: Prepare Aminet release
image: walkero/lha-on-docker:latest
commands:
- mkdir aminet-release
- cp iGame-${DRONE_TAG}-$(date +'%Y%m%d').lha ./aminet-release/iGame.lha
- sed -i "s/VERSION_TAG/${DRONE_TAG}/" ./aminet.readme
- cp ./aminet.readme ./aminet-release/iGame.readme
depends_on:
- Create release
- name: Upload to Aminet
image: cschlosser/drone-ftps
environment:
FTP_USERNAME: "anonymous"
FTP_PASSWORD: "[email protected]"
PLUGIN_HOSTNAME: main.aminet.net:21
PLUGIN_SRC_DIR: /aminet-release
PLUGIN_DEST_DIR: ./new
PLUGIN_SECURE: "false"
PLUGIN_VERIFY: "false"
PLUGIN_CHMOD: "false"
depends_on:
- Prepare Aminet release
- name: Prepare OS4Depot release
image: walkero/lha-on-docker:latest
environment:
OS4DEPOT_PASSPHRASE:
from_secret: OS4DEPOT_PASSPHRASE
commands:
- mkdir os4depot-release
- cp iGame-${DRONE_TAG}-$(date +'%Y%m%d').lha ./os4depot-release/iGame.lha
- sed -i "s/VERSION_TAG/${DRONE_TAG}/" ./os4depot.readme
- sed -i "s/OS4DEPOT_PASSPHRASE/$OS4DEPOT_PASSPHRASE/" ./os4depot.readme
- cp ./os4depot.readme ./os4depot-release/iGame_lha.readme
depends_on:
- Create release
- name: Upload to OS4Depot
image: cschlosser/drone-ftps
environment:
FTP_USERNAME: "ftp"
FTP_PASSWORD: ""
PLUGIN_HOSTNAME: os4depot.net:21
PLUGIN_SRC_DIR: /os4depot-release
PLUGIN_DEST_DIR: ./upload
PLUGIN_SECURE: "false"
PLUGIN_VERIFY: "false"
PLUGIN_CHMOD: "false"
depends_on:
- Prepare OS4Depot release
trigger:
event:
include:
- tag
depends_on:
- drone-agents-poweron
node:
agents: builders
---
kind: pipeline
type: docker
name: drone-agents-poweroff
clone:
disable: true
steps:
- name: drone-agents-poweroff
image: walkero/hcloud:1.30
environment:
HCLOUD_TOKEN:
from_secret: HCLOUD_TOKEN
commands:
- curl -sw "\n" "http://10.0.0.2:5000/container/count/drone-" | while read var1; do if [ $var1 -eq 1 ]; then hcloud server poweroff drone-agents; fi ; done
depends_on:
- compile-tests
- compile-release-bytag
trigger:
status:
- failure
- success
branch:
include:
- master
- develop
event:
include:
- push
- pull_request
- tag