Skip to content

Commit

Permalink
buildbot: sign APK index file
Browse files Browse the repository at this point in the history
  • Loading branch information
pktpls committed Nov 14, 2024
1 parent 57fb2ca commit 09c2279
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions roles/buildbot/files/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ def branchToFalterBranch(props):
return o2f.get(props["branch"])


@util.renderer
def signCommand(props, wwwdir):
match props["branch"]:
case "openwrt-24.10" | "openwrt-23.05" | "openwrt-22.03" | "openwrt-21.02":
return f"signify-openbsd -S -m {wwwdir}/falter/Packages -s packagefeed_master.sec"
case _:
return f"apk adbsign --allow-untrusted --sign-key apk.snapshot.PRIVATE.pem {wwwdir}/falter/packages.adb"


# Fans out to one builder per arch and blocks for the results.
def packagesFactory(f, wwwPrefix):
f.buildClass = AsyncBuild
Expand Down Expand Up @@ -289,14 +298,7 @@ def packagesArchFactory(f, wwwPrefix, wwwURL, alpineVersion):
steps.MasterShellCommand(
name="sign",
haltOnFailure=True,
command=[
"sh",
"-c",
util.Interpolate(
"signify-openbsd -S -m %(kw:wwwdir)s/falter/Packages -s packagefeed_master.sec",
wwwdir=wwwdir,
),
],
command=["sh", "-c", signCommand.withArgs(wwwdir)],
)
)
f.addStep(
Expand Down

0 comments on commit 09c2279

Please sign in to comment.