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.
This commit is contained in:
Christian Poessinger 2021-06-05 10:17:29 +02:00
parent 3bf7078334
commit c67a6eb542

View File

@ -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()) {