Skip to content

Commit c2ad35d

Browse files
committed
jobs/build: gate all rerun logic on uploading
We only actually run the jobs when `uploading` is set. So it seems wrong to update the build description. In fact, let's not even waste time looking for missing arches or reading build metadata. Patch best viewed with whitespace ignored.
1 parent b813111 commit c2ad35d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

jobs/build.Jenkinsfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,16 @@ lock(resource: "build-${params.STREAM}") {
265265
// Nothing changed since the latest build. Check if it's missing
266266
// some arches and retrigger `build-arch` only for the missing
267267
// arches, and the follow-up `release` job. Match the exact src
268-
// config commit that was used.
269-
def builds = readJSON file: "builds/builds.json"
270-
assert buildID == builds.builds[0].id
271-
def missing_arches = additional_arches - builds.builds[0].arches
272-
if (missing_arches) {
273-
def meta = readJSON(text: shwrapCapture("cosa meta --build=${buildID} --dump"))
274-
def rev = meta["coreos-assembler.config-gitrev"]
275-
currentBuild.description = "${build_description} 🔨 ${buildID}"
276-
if (uploading) {
268+
// config commit that was used. Skip if not uploading since it's
269+
// required for multi-arch.
270+
if (uploading) {
271+
def builds = readJSON file: "builds/builds.json"
272+
assert buildID == builds.builds[0].id
273+
def missing_arches = additional_arches - builds.builds[0].arches
274+
if (missing_arches) {
275+
def meta = readJSON(text: shwrapCapture("cosa meta --build=${buildID} --dump"))
276+
def rev = meta["coreos-assembler.config-gitrev"]
277+
currentBuild.description = "${build_description} 🔨 ${buildID}"
277278
// Run the mArch jobs and wait. We wait here because if they fail
278279
// we don't want to bother running the release job again since the
279280
// goal is to get a complete build.

0 commit comments

Comments
 (0)