summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-05 10:17:29 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-05 10:21:12 +0200
commitc67a6eb542e9e79d6196f9aed56a04853e125a22 (patch)
tree56e0a45274968eeac4f6ab63bba7eb50daccd775
parent3bf7078334a6a296b88531781fd488647d9c12c6 (diff)
downloadvyos-build-c67a6eb542e9e79d6196f9aed56a04853e125a22.tar.gz
vyos-build-c67a6eb542e9e79d6196f9aed56a04853e125a22.zip
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.
-rw-r--r--vars/buildPackage.groovy12
1 files 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()) {