Skip to content

Commit d213e6a

Browse files
committed
jobs/test-override: resolve Bodhi IDs to Koji IDs early on
It's silly to do this resolution on each builder separately. Let's just do it once. That also simplifies the downloading loop.
1 parent 6c1640c commit d213e6a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

jobs/test-override.Jenkinsfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ try {
7878
}
7979
currentBuild.description = "[${descPrefix}] Running"
8080

81+
// resolve bodhi IDs to koji builds
82+
for (id in bodhi_update_ids) {
83+
def build_ids = shwrapCapture("curl -sSL https://bodhi.fedoraproject.org/updates/${id} | jq -r .update.builds[].nvr").split() as List
84+
if (build_ids.size() == 0) {
85+
error("Bodhi update ${id} has no builds!")
86+
}
87+
koji_build_ids += build_ids
88+
}
89+
8190
def arches = pipeutils.get_additional_arches(pipecfg, params.STREAM) as Set
8291
// XXX: this should be further intersected with the set of arches relevant
8392
// for the test subject
@@ -147,14 +156,6 @@ try {
147156
def arch = architecture
148157
parallelruns[arch] = {
149158
pipeutils.withOptionalExistingCosaRemoteSession(arch: arch, session: archinfo[arch]['session']) {
150-
for (id in bodhi_update_ids) {
151-
// this would be `bodhi updates download`, but cosa doesn't have it and
152-
// it doesn't seem worth pulling it in just for this
153-
shwrap("""cosa shell -- env -C overrides/rpm sh -c '\
154-
curl -sSL https://bodhi.fedoraproject.org/updates/${id} | \
155-
jq -r .update.builds[].nvr | \
156-
xargs -n 1 koji download-build --arch ${arch} --arch noarch'""")
157-
}
158159
for (id in koji_build_ids) {
159160
// XXX: I think this will fail for a package that doesn't have noarch
160161
// packages nor packages on $arch

0 commit comments

Comments
 (0)