This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.drone.yml
303 lines (267 loc) · 8.16 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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
---
kind: pipeline
name: default
clone:
depth: 42
steps:
- name: restore-cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- ./libraries/vendor
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
volumes:
- name: cache
path: /cache
- name: composer
image: joomlaprojects/docker-images:php7.3-composer
depends_on: [ restore-cache ]
commands:
- composer validate --no-check-all --strict
- composer install --no-progress --no-suggest
- name: phpcs
image: joomlaprojects/docker-images:php7.2
depends_on: [ composer ]
commands:
- echo $(date)
- ./libraries/vendor/bin/phpcs --extensions=php -p --standard=libraries/vendor/joomla/cms-coding-standards/lib/Joomla-CMS .
- echo $(date)
- name: npm
image: node:current-alpine
depends_on: [ phpcs ]
commands:
- npm ci --unsafe-perm
- name: publish-diff
image: joomlaprojects/docker-images:patchtester
depends_on: [ npm ]
environment:
CMP_ARCHIVE_NAME: "build"
CMP_MASTER_FOLDER: "/reference"
CMP_SLAVE_FOLDER: "." # The directory the current repo is in
FTP_USERNAME:
from_secret: ftpusername
FTP_PASSWORD:
from_secret: ftppassword
FTP_HOSTNAME: ci.joomla.org
FTP_PORT: "21"
FTP_DEST_DIR: /artifacts
FTP_VERIFY: "false"
FTP_SECURE: "true"
BRANCH_NAME: "4.0-dev" # Current branch to check against (from repo joomla/joomla-cms)
DRONE_PULL_REQUEST: DRONE_PULL_REQUEST
commands:
- export PULL_ID=$DRONE_PULL_REQUEST
- /bin/compare.sh
volumes:
- name: reference
path: /reference
when:
branch:
- 4.0-dev
- name: rebuild-cache
image: drillster/drone-volume-cache
depends_on: [ npm ]
settings:
rebuild: true
mount:
- ./libraries/vendor
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
volumes:
- name: cache
path: /cache
- name: php72-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
- name: php73-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php7.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
- name: php74-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php7.4
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
- name: php80-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php8.0
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
- name: php72-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
- name: php73-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
- name: php74-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.4
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
- name: php80-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.0
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
- name: php72-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
- name: php73-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
- name: php74-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.4
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
- name: php80-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.0
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
- name: javascript-cs
depends_on: [ npm ]
image: joomlaprojects/docker-images:systemtests
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
- npm run lint:js
- name: javascript-tests
depends_on: [ npm ]
image: joomlaprojects/docker-images:systemtests
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
- npm run test
- name: system-tests-mysql
depends_on: [ javascript-tests ]
image: joomlaprojects/docker-images:systemtests
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql
- name: system-tests-mysql8
depends_on: [ system-tests-mysql ]
image: joomlaprojects/docker-images:systemtests
failure: ignore
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8
- name: system-tests-postgres
depends_on: [ system-tests-mysql8 ]
image: joomlaprojects/docker-images:systemtests
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres
- name: api-tests
depends_on: [ system-tests-postgres ]
image: joomlaprojects/docker-images:systemtests
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)"
- name: artifacts-system-tests
image: cschlosser/drone-ftps
depends_on: [ api-tests ]
environment:
FTP_USERNAME:
from_secret: ftpusername
FTP_PASSWORD:
from_secret: ftppassword
PLUGIN_HOSTNAME: ci.joomla.org:21
PLUGIN_SRC_DIR: /tests/Codeception/_output/
PLUGIN_DEST_DIR: /artifacts
PLUGIN_SECURE: false
PLUGIN_EXCLUDE: ^\.git/$
commands:
- export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
- echo https://ci.joomla.org:444$PLUGIN_DEST_DIR
- /bin/upload.sh
when:
status:
- failure
- name: analysis4x
image: rips/rips-cli:3.2.2
depends_on: [ api-tests ]
when:
repo:
- joomla/joomla-cms
branch:
- 4.0-dev
commands:
- export RIPS_BASE_URI='https://api.rips.joomla.org'
- rips-cli rips:list --table=scans -n -p filter='{"__and":[{"__lessThan":{"percent":100}}]}'
- rips-cli rips:scan:start -G -a 2 -t 1 -R -k -p $(pwd) -t 1 -T $DRONE_REPO_NAMESPACE-$DRONE_BRANCH || { echo "Please contact the security team at [email protected]"; exit 1; }
environment:
RIPS_EMAIL:
from_secret: RIPS_EMAIL
RIPS_PASSWORD:
from_secret: RIPS_PASSWORD
branches:
exclude: [ l10n_* ]
volumes:
- name: cache
host:
path: /tmp/cache
- name: reference
host:
path: /tmp/reference
services:
- name: mysql
image: mysql:5.7
environment:
MYSQL_USER: joomla_ut
MYSQL_PASSWORD: joomla_ut
MYSQL_ROOT_PASSWORD: joomla_ut
MYSQL_DATABASE: test_joomla
- name: mysql8
image: mysql:8
command: ["--default-authentication-plugin=mysql_native_password"]
environment:
MYSQL_USER: joomla_ut
MYSQL_PASSWORD: joomla_ut
MYSQL_ROOT_PASSWORD: joomla_ut
MYSQL_DATABASE: test_joomla
- name: memcached
image: memcached:alpine
- name: redis
image: redis:alpine
- name: postgres
image: postgres:9-alpine
ports:
- 5432
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: joomla_ut
POSTGRES_DB: test_joomla
---
kind: signature
hmac: 17d91249ca40538006030c65bf4f73b4366e30bf5704174778f163e82c382e07
...