ZeroTierOne/.drone.jsonnet

41 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-11-30 09:29:33 +00:00
local registry = "084037375216.dkr.ecr.us-east-2.amazonaws.com";
2022-05-14 08:08:22 +00:00
local targets = [
2022-11-30 09:29:33 +00:00
{ "os": "linux", "name": "sid", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x", "riscv64" ], "events": [ "push", "tag", "custom" ] },
2022-05-14 08:08:22 +00:00
];
local Build(platform, os, isa, events) = {
"kind": "pipeline",
"type": "docker",
"pull": "always",
"name": platform + " " + isa + " " + "build",
"clone": { "depth": 1 },
"steps": [
{
"name": "build",
2022-11-30 09:29:33 +00:00
"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}"
]
2022-05-14 08:08:22 +00:00
},
2022-09-12 16:02:21 +00:00
// {
2022-11-30 09:29:33 +00:00
// "name": "list",
// "image": registry + "/honda-builder",
// "commands": [ "ls -la " + platform ]
// },
2022-05-14 08:08:22 +00:00
],
[ 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
])