-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.drone.jsonnet
178 lines (176 loc) · 7.64 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
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
local build(name, arch, image, native) = {
platform: {
os: "linux",
arch: arch
},
kind: "pipeline",
name: name + "-" + arch,
steps: [
{
name: "build",
image: image,
commands: [
"./" + name + "/build.sh"
],
volumes: [
{
name: "docker",
path: "/usr/bin/docker"
},
{
name: "docker.sock",
path: "/var/run/docker.sock"
}
]
},
{
name: "test",
image: image,
commands: [
"./" + name + "/test.sh"
],
when: {
status: [ "failure", "success" ]
}
},
{
name: "test buster",
image: "debian:buster-slim",
commands: [
"./" + name + "/test.sh"
],
when: {
status: [ "failure", "success" ]
}
},
{
name: "test platform",
image: "syncloud/platform-" + arch + ":latest",
commands: [
"./" + name + "/test.sh"
],
when: {
status: [ "failure", "success" ]
}
},
{
name: "artifact",
image: "appleboy/drone-scp:latest",
settings: {
host: {
from_secret: "artifact_host"
},
username: "artifact",
key: {
from_secret: "artifact_key"
},
timeout: "2m",
command_timeout: "2m",
target: "/home/artifact/repo/3rdparty/${DRONE_BUILD_NUMBER}-" + arch,
source: name + "/*.tar.gz",
strip_components: 1
},
when: {
status: [ "failure", "success" ]
}
},
{
name: "publish to github",
image: "plugins/github-release:latest",
settings: {
api_key: {
from_secret: "github_token"
},
files: name + "/*.tar.gz",
overwrite: true,
file_exists: "overwrite"
},
when: {
event: [ "tag" ]
}
}
],
volumes: [
{
name: "dbus",
host: {
path: "/var/run/dbus"
}
},
{
name: "docker",
host: {
path: "/usr/bin/docker"
}
},
{
name: "docker.sock",
host: {
path: "/var/run/docker.sock"
}
}
]
};
[
build(item.project, item.arch, item.image, item.native)
for item in [
#{project: "asterisk", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "bind9", image: "debian:buster-backports", arch: "amd64"},
#{project: "bind9", image: "debian:buster-backports", arch: "arm"},
#{project: "bind9", image: "debian:buster-backports", arch: "arm64"},
{project: "btrfs", image: "debian:buster", arch: "amd64"},
{project: "btrfs", image: "debian:buster", arch: "arm64"},
{project: "btrfs", image: "debian:buster", arch: "arm"},
#{project: "dovecot", image: "debian:buster", arch: "arm"},
#{project: "dovecot", image: "debian:buster", arch: "amd64"},
#{project: "dovecot", image: "debian:buster", arch: "arm64"},
#{project: "gcc-5", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "git", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "gptfdisk", image: "syncloud/build-deps-arm", arch: "arm"},
#{project: "gptfdisk", image: "syncloud/build-deps-amd64", arch: "amd64"},
#{project: "gptfdisk", image: "syncloud/build-deps-buster-arm64", arch: "arm64"},
#{project: "ImageMagick", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "libvips", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "mariadb", image: "debian:buster", arch: "amd64"},
#{project: "mariadb", image: "debian:buster", arch: "arm"},
#{project: "mariadb", image: "debian:buster", arch: "arm64"},
#{project: "mongodb", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "mongodb-3.4", image: "syncloud/build-deps-buster", archs: ["amd64"], native: false},
#{project: "mongodb-3.6", image: "syncloud/build-deps-buster", archs: ["amd64"], native: false},
#{project: "mongodb-4", image: "syncloud/build-deps-buster", archs: ["amd64"], native: false},
#{project: "nginx", image: "syncloud/build-deps-arm", arch: "arm"},
#{project: "nginx", image: "syncloud/build-deps-amd64", arch: "amd64"},
#{project: "nginx", image: "syncloud/build-deps-buster-arm64", arch: "arm64"},
#{project: "nodejs", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "opendkim", image: "debian:buster", arch: "arm"},
#{project: "opendkim", image: "debian:buster", arch: "amd64"},
#{project: "opendkim", image: "debian:buster", arch: "arm64"},
#{project: "openldap", image: "syncloud/build-deps-arm", arch: "arm"},
#{project: "openldap", image: "syncloud/build-deps-amd64", arch: "amd64"},
#{project: "openldap", image: "syncloud/build-deps-buster-arm64", arch: "arm64"},
#{project: "openvpn", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "openssl", image: "syncloud/build-deps-arm", arch: "arm"},
#{project: "openssl", image: "syncloud/build-deps-amd64", arch: "amd64"},
#{project: "openssl", image: "syncloud/build-deps-buster-arm64", arch: "arm64"},
#{project: "phantomjs", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "php", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "php7", image: "syncloud/build-deps-arm", arch: "arm"},
#{project: "php7", image: "syncloud/build-deps-amd64", arch: "amd64"},
#{project: "php7", image: "syncloud/build-deps-buster-arm64", arch: "arm64"},
#{project: "php8", image: "gcc:10", archs: ["arm", "amd64"], native: true},
#{project: "postgresql", image: "debian:buster-slim", arch: "arm"},
#{project: "postgresql", image: "debian:buster-slim", arch: "amd64"},
#{project: "postgresql", image: "debian:buster-slim", arch: "arm64"},
#{project: "postgresql-10", image: "debian:buster-slim", arch: "arm"},
#{project: "postgresql-10", image: "debian:buster-slim", arch: "amd64"},
#{project: "postgresql-10", image: "debian:buster-slim", arch: "arm64"},
#{project: "PyYAML", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "python", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "python3", image: "syncloud/build-deps-arm", arch: "arm"},
#{project: "python3", image: "syncloud/build-deps-amd64:2021.07", arch: "amd64"},
#{project: "python3", image: "syncloud/build-deps-arm64:2021.07", arch: "arm64"},
#{project: "redis", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "rsyslog", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
#{project: "sqlite", image: "syncloud/build-deps", archs: ["arm", "amd64"], native: false},
]
]