mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Adds retry mechanism for JNLP4-connect issues in unstash function (#3030)
* Adds retry mechanism for JNLP4-connect issues in unstash function * Bugfix Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
parent
1ddd966249
commit
11f927caee
@ -86,6 +86,17 @@ def unstash(name, msg = "Unstash failed:") {
|
|||||||
unstashedContent += name
|
unstashedContent += name
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
echo "$msg $name (${e.getMessage()})"
|
echo "$msg $name (${e.getMessage()})"
|
||||||
|
if (e.getMessage().contains("JNLP4-connect")) {
|
||||||
|
sleep(3000) // Wait 3 seconds in case it has been a network hiccup
|
||||||
|
try {
|
||||||
|
echo "[Retry JNLP4-connect issue] Unstashing content: ${name}"
|
||||||
|
steps.unstash name
|
||||||
|
unstashedContent += name
|
||||||
|
} catch (errRetry) {
|
||||||
|
msg = "[Retry JNLP4-connect issue] Unstashing failed:"
|
||||||
|
echo "$msg $name (${errRetry.getMessage()})"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return unstashedContent
|
return unstashedContent
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user