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 c7a72da commit dfdbefe
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions roles/buildbot/files/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ 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):
Expand Down Expand Up @@ -292,10 +300,7 @@ def packagesArchFactory(f, wwwPrefix, wwwURL, alpineVersion):
command=[
"sh",
"-c",
util.Interpolate(
"signify-openbsd -S -m %(kw:wwwdir)s/falter/Packages -s packagefeed_master.sec",
wwwdir=wwwdir,
),
signCommand.withArgs(wwwdir)
],
)
)
Expand All @@ -304,11 +309,7 @@ def packagesArchFactory(f, wwwPrefix, wwwURL, alpineVersion):
name="cleanup master",
alwaysRun=True,
warnOnFailure=False,
command=[
"sh",
"-c",
util.Interpolate("rm -vf %(kw:tarfile)s", tarfile=tarfile),
],
command=["sh", "-c", util.Interpolate("rm -vf %(kw:tarfile)s", tarfile=tarfile)],
)
)
f.addStep(
Expand Down

0 comments on commit dfdbefe

Please sign in to comment.