mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
tweaking
This commit is contained in:
parent
91006bde1f
commit
ed63678bba
2 changed files with 25 additions and 25 deletions
|
@ -80,7 +80,7 @@ local host_volumes(os) = if os == "linux" then [
|
|||
{ name: "zerotier-releases", host: { path: "/zerotier-releases" } },
|
||||
] else [];
|
||||
|
||||
local index_image(distro) =
|
||||
local sign_image(distro) =
|
||||
if distro == "debian" || distro == "ubuntu" then
|
||||
registry + "/apt-builder"
|
||||
else if distro == "redhat" || distro == "fedora" || distro == "amazon" then
|
||||
|
@ -102,9 +102,9 @@ local copy_commands(os, distro, name, isa, version) =
|
|||
]
|
||||
;
|
||||
|
||||
local index_commands(os, channel, distro, name, isas) =
|
||||
local sign_commands(os, channel, distro, name, isas) =
|
||||
if os == "linux" then
|
||||
[ "/usr/local/bin/index " + channel + " " + distro + " " + name + " " + std.join(" ", isas) ]
|
||||
[ "/usr/local/bin/sign " + channel + " " + distro + " " + name + " " + std.join(" ", isas) ]
|
||||
else if os == "windows" then
|
||||
[ "Get-ChildItem -Recurse windows" ]
|
||||
;
|
||||
|
@ -195,29 +195,29 @@ local Test(os, distro, name, isa, events) = {
|
|||
],
|
||||
"volumes": host_volumes(os),
|
||||
"platform": { "os": os, [ if isa == "arm64" || isa == "armv7" then "arch" ]: "arm64" },
|
||||
"depends_on": [ std.join(" ", [ name, "index" ]) ],
|
||||
"depends_on": [ std.join(" ", [ name, "sign" ]) ],
|
||||
"trigger": { "event": events }
|
||||
};
|
||||
|
||||
local Index(p) = {
|
||||
local Sign(p) = {
|
||||
"kind": "pipeline",
|
||||
"type": pipeline_type(p.os),
|
||||
"name": std.join(" ", [ p.name, "index" ]),
|
||||
"name": std.join(" ", [ p.name, "sign" ]),
|
||||
"pull": "always",
|
||||
"clone": { "depth": 1 },
|
||||
"steps": [
|
||||
{
|
||||
"name": "index build",
|
||||
"image": index_image(p.distro),
|
||||
"commands": index_commands(p.os, "zerotier-builds", p.distro, p.name, p.isas),
|
||||
"name": "sign build",
|
||||
"image": sign_image(p.distro),
|
||||
"commands": sign_commands(p.os, "zerotier-builds", p.distro, p.name, p.isas),
|
||||
"volumes": build_step_volumes(p.os),
|
||||
"environment":{ "GPG_PRIVATE_KEY": { from_secret: "gpg-private-key" }},
|
||||
"when": { "event": [ "push" ]},
|
||||
},
|
||||
{
|
||||
"name": "index release",
|
||||
"image": index_image(p.distro),
|
||||
"commands": index_commands(p.os, "zerotier-releases", p.distro, p.name, p.isas),
|
||||
"name": "sign release",
|
||||
"image": sign_image(p.distro),
|
||||
"commands": sign_commands(p.os, "zerotier-releases", p.distro, p.name, p.isas),
|
||||
"volumes": release_step_volumes(p.os),
|
||||
"environment":{ "GPG_PRIVATE_KEY": { from_secret: "gpg-private-key" }},
|
||||
"when": { "event": [ "tag" ]},
|
||||
|
@ -239,7 +239,7 @@ std.flattenArrays([
|
|||
for isa in p.isas
|
||||
] +
|
||||
[
|
||||
Index(p)
|
||||
Sign(p)
|
||||
]
|
||||
for p in targets
|
||||
]) +
|
||||
|
|
24
.drone.yml
24
.drone.yml
|
@ -60,18 +60,18 @@ clone:
|
|||
depends_on:
|
||||
- el9 amd64 build
|
||||
kind: pipeline
|
||||
name: el9 index
|
||||
name: el9 sign
|
||||
platform:
|
||||
os: linux
|
||||
pull: always
|
||||
steps:
|
||||
- commands:
|
||||
- /usr/local/bin/index zerotier-builds redhat el9 amd64
|
||||
- /usr/local/bin/sign zerotier-builds redhat el9 amd64
|
||||
environment:
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: gpg-private-key
|
||||
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/dnf-builder
|
||||
name: index build
|
||||
name: sign build
|
||||
volumes:
|
||||
- name: zerotier-builds
|
||||
path: /zerotier-builds
|
||||
|
@ -79,12 +79,12 @@ steps:
|
|||
event:
|
||||
- push
|
||||
- commands:
|
||||
- /usr/local/bin/index zerotier-releases redhat el9 amd64
|
||||
- /usr/local/bin/sign zerotier-releases redhat el9 amd64
|
||||
environment:
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: gpg-private-key
|
||||
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/dnf-builder
|
||||
name: index release
|
||||
name: sign release
|
||||
volumes:
|
||||
- name: zerotier-releases
|
||||
path: /zerotier-releases
|
||||
|
@ -166,18 +166,18 @@ clone:
|
|||
depends_on:
|
||||
- jammy amd64 build
|
||||
kind: pipeline
|
||||
name: jammy index
|
||||
name: jammy sign
|
||||
platform:
|
||||
os: linux
|
||||
pull: always
|
||||
steps:
|
||||
- commands:
|
||||
- /usr/local/bin/index zerotier-builds ubuntu jammy amd64
|
||||
- /usr/local/bin/sign zerotier-builds ubuntu jammy amd64
|
||||
environment:
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: gpg-private-key
|
||||
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/apt-builder
|
||||
name: index build
|
||||
name: sign build
|
||||
volumes:
|
||||
- name: zerotier-builds
|
||||
path: /zerotier-builds
|
||||
|
@ -185,12 +185,12 @@ steps:
|
|||
event:
|
||||
- push
|
||||
- commands:
|
||||
- /usr/local/bin/index zerotier-releases ubuntu jammy amd64
|
||||
- /usr/local/bin/sign zerotier-releases ubuntu jammy amd64
|
||||
environment:
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: gpg-private-key
|
||||
image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/apt-builder
|
||||
name: index release
|
||||
name: sign release
|
||||
volumes:
|
||||
- name: zerotier-releases
|
||||
path: /zerotier-releases
|
||||
|
@ -214,7 +214,7 @@ volumes:
|
|||
clone:
|
||||
depth: 1
|
||||
depends_on:
|
||||
- el9 index
|
||||
- el9 sign
|
||||
kind: pipeline
|
||||
name: el9 amd64 test
|
||||
platform:
|
||||
|
@ -258,7 +258,7 @@ volumes:
|
|||
clone:
|
||||
depth: 1
|
||||
depends_on:
|
||||
- jammy index
|
||||
- jammy sign
|
||||
kind: pipeline
|
||||
name: jammy amd64 test
|
||||
platform:
|
||||
|
|
Loading…
Add table
Reference in a new issue