From 27be9f5027a03dd9807959c7e28de4bd156cb83b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com> Date: Mon, 28 Jun 2021 14:54:42 -0400 Subject: [PATCH] Jenkinsfile: Partial deployment, follow up. This is a follow up to commit 4ee939224b, which introduced partial deployments. The unstash operation also needs to be handled specially, as it may now fail attempting to unstash an item that could not be stashed previously. * Jenkinsfile ('Sign & deploy packages'): Skip target deployment when it fails to be unstashed. Change-Id: I59341e4c3bb007125402f4b28979d0e8e963757d --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e71c1a9a..d97776fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -186,7 +186,12 @@ See https://wiki.savoirfairelinux.com/wiki/Jenkins.jami.net#Configuration" steps { script { TARGETS.each { target -> - unstash target + try { + unstash target + } catch (err) { + echo "Failed to unstash ${target}, skipping..." + return + } def distribution = target - ~/^package-/ echo "Deploying packages for ${distribution}..." sh """scripts/deploy-packages.sh \ -- GitLab