-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.jsonnet
72 lines (70 loc) · 1.99 KB
/
.drone.jsonnet
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
local Pipeline(omekaVersion, phpVersion, dbImage) = {
kind: 'pipeline',
type: 'docker',
name: 'omeka:' + omekaVersion + ' php:' + phpVersion + ' ' + dbImage,
workspace: {
path: 'omeka-s/modules/ItemSetsTree',
},
steps: [
{
name: 'test',
image: 'biblibre/omeka-s-ci:' + omekaVersion + '-php' + phpVersion,
commands: [
'cp -rT /usr/src/omeka-s ../..',
"echo 'host = \"db\"\\nuser = \"root\"\\npassword = \"root\"\\ndbname = \"omeka_test\"\\n' > ../../application/test/config/database.ini",
'bash -c "cd ../.. && php /usr/local/libexec/wait-for-db.php"',
'../../vendor/bin/phpunit',
'../../node_modules/.bin/gulp test:module:cs',
],
},
],
services: [
{
name: 'db',
image: dbImage,
environment: {
MYSQL_ROOT_PASSWORD: 'root',
MYSQL_DATABASE: 'omeka_test',
},
},
],
};
local DocumentationPipeline() = {
kind: 'pipeline',
type: 'docker',
name: 'documentation',
steps: [
{
name: 'build',
image: 'python:3',
commands: [
'sh .drone/documentation-build.sh',
],
},
{
name: 'push',
image: 'alpine',
commands: [
'apk add git openssh',
'sh .drone/documentation-push.sh',
],
environment: {
GH_DEPLOY_KEY: {
from_secret: 'GH_DEPLOY_KEY',
},
},
},
],
trigger: {
branch: ['master'],
event: ['push'],
},
};
[
Pipeline('3.0.2', '7.4', 'mariadb:10.9'),
Pipeline('3.1.2', '8.0', 'mariadb:10.9'),
Pipeline('3.2.3', '8.0', 'mariadb:10.9'),
Pipeline('4.0.0-rc', '8.0', 'mariadb:10.9'),
Pipeline('4.0.0-rc', '8.1', 'mariadb:10.9'),
DocumentationPipeline(),
]