From c67a6eb542e9e79d6196f9aed56a04853e125a22 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 5 Jun 2021 10:17:29 +0200 Subject: Jenkins: lib: it is also possible that unstaging of the amd64 binaries fail This is due to the fact when no package is build b/c then when { } condition is unmet, we also have no amd64 package. Thus the try { } block needs to be extended to not only match for arm64 unstash. --- vars/buildPackage.groovy | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy index cf1d5a81..c5906d0b 100644 --- a/vars/buildPackage.groovy +++ b/vars/buildPackage.groovy @@ -124,14 +124,16 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) { } steps { script { - // Unpack files for amd64 - unstash 'binary-amd64' - - // Unpack files for arm64 IF they exist + // Unpack files for amd64 and arm64 if packages got build try { + unstash 'binary-amd64' unstash 'binary-arm64' } catch (e) { - print "Unstash arm64 failed, ignoring" + print "Unstash failed, ignoring" + println(e.toString()) + currentBuild.result = 'SUCCESS' + // return here instead of throwing error to keep the build "green" + return } if (isCustomBuild()) { -- cgit v1.2.3