-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.jsonnet
63 lines (60 loc) · 1.29 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
local VERSION = "7.2.12";
local build(contrib=false) = {
"kind": "pipeline",
"name": "build" + (if contrib then "-contrib" else ""),
"steps": [
{
"name": "set image tags",
"image": "alpine",
"environment": {
"VERSION": VERSION
},
"commands": [
"./write-tags.sh $VERSION" + (if contrib then " contrib" else " ") + "> .tags",
"# Will build the following tags:",
"cat .tags"
]
},
{
"name": "build docker image",
"image": "plugins/docker",
"settings": {
"repo": "ovdnet/atheme",
"username": {
"from_secret": "docker_user"
},
"password": {
"from_secret": "docker_password"
},
"build_args": std.prune([
"ATHEME_VERSION=" + VERSION,
(if contrib then "BUILD_CONTRIB_MODULES=true")
])
},
"trigger": {
"branch": [
"master"
]
},
"volumes": [
{
"name": "docker-socket",
"path": "/var/run/docker.sock"
}
]
}
],
"volumes": [
{
"name": "docker-socket",
"host": {
"path": "/var/run/docker.sock"
}
}
],
"depends_on": std.prune([if contrib then "build"]),
};
[
build(),
build(contrib=true)
]