forked from zerotier/ZeroTierOne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.jsonnet
40 lines (36 loc) · 1.18 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
local registry = "084037375216.dkr.ecr.us-east-2.amazonaws.com";
local targets = [
{ "os": "linux", "name": "sid", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x", "riscv64" ], "events": [ "push", "tag", "custom" ] },
];
local Build(platform, os, isa, events) = {
"kind": "pipeline",
"type": "docker",
"pull": "always",
"name": platform + " " + isa + " " + "build",
"clone": { "depth": 1 },
"steps": [
{
"name": "build",
"image": registry + "/honda-builder",
"commands": [
"aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin " + registry,
"./ci/scripts/build.sh " + platform + " " + isa + " " + "100.0.0+${DRONE_COMMIT_SHA:0:8}" + " " + "${DRONE_BUILD_EVENT}"
]
},
// {
// "name": "list",
// "image": registry + "/honda-builder",
// "commands": [ "ls -la " + platform ]
// },
],
[ if isa == "arm64" || isa == "armv7" then "platform" ]: { os: os, arch: "arm64" },
"trigger": { "event": events }
};
// puttin on the bits
std.flattenArrays([
[
Build(p.name, p.os, isa, p.events)
for isa in p.isas
]
for p in targets
])