-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.drone.jsonnet
108 lines (103 loc) · 2.86 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
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
local volumes = [
{
name: "composer-cache",
path: "/tmp/composer-cache",
},
];
local hostvolumes = [
{
name: "composer-cache",
host: {path: "/tmp/composer-cache"}
},
];
local composer(phpversion, params) = {
name: "composer",
image: "joomlaprojects/docker-images:php" + phpversion,
volumes: volumes,
commands: [
"php -v",
"composer update " + params,
]
};
local phpunit(phpversion) = {
name: "PHPUnit",
image: "joomlaprojects/docker-images:php" + phpversion,
[if phpversion == "8.3" then "failure"]: "ignore",
commands: ["vendor/bin/phpunit"]
};
local pipeline(name, phpversion, params) = {
kind: "pipeline",
name: "PHP " + name,
volumes: hostvolumes,
steps: [
composer(phpversion, params),
phpunit(phpversion)
],
};
[
{
kind: "pipeline",
name: "Codequality",
volumes: hostvolumes,
steps: [
{
name: "composer",
image: "joomlaprojects/docker-images:php8.1",
volumes: volumes,
commands: [
"php -v",
"composer update"
]
},
{
name: "phpcs",
image: "joomlaprojects/docker-images:php8.1",
depends: [ "composer" ],
commands: [
"vendor/bin/phpcs --standard=ruleset.xml src/"
]
},
{
name: "phan",
image: "joomlaprojects/docker-images:php8.1-ast",
depends: [ "composer" ],
failure: "ignore",
commands: [
"vendor/bin/phan"
]
},
{
name: "phpstan",
image: "joomlaprojects/docker-images:php8.1",
depends: [ "composer" ],
failure: "ignore",
commands: [
"./vendor/bin/phpstan",
]
},
{
name: "phploc",
image: "joomlaprojects/docker-images:php8.1",
depends: [ "composer" ],
failure: "ignore",
commands: [
"phploc src",
]
},
{
name: "phpcpd",
image: "joomlaprojects/docker-images:php8.1",
depends: [ "composer" ],
failure: "ignore",
commands: [
"phpcpd src",
]
}
]
},
pipeline("8.1 lowest", "8.1", "--prefer-stable --prefer-lowest"),
pipeline("8.1", "8.1", "--prefer-stable"),
pipeline("8.2", "8.2", "--prefer-stable"),
pipeline("8.3", "8.3", "--prefer-stable"),
pipeline("8.4", "8.4", "--prefer-stable"),
]