Compare commits

..

No commits in common. "bb3021dd4c630d4ee3dfdc6f71d00a9fb29b97dc" and "5f7f1d25b427e5439c50a2e328ae1126e17d1edb" have entirely different histories.

View File

@ -14,20 +14,6 @@ def setSuccessCheck(String name, String title) {
}
/* -------------------------------------------------------------------------- */
/**
*
* Helper function that emits `Success` status.
*
*/
def setFailureCheck(String name, String title) {
publishChecks(
name: name,
title: title,
summary: '— Failed',
conclusion: "FAILURE"
)
}
/* -------------------------------------------------------------------------- */
/**
* Replacement for `stage` function for default pipeline.
*
* Has the same arguments but does side-effects to the stage:
@ -39,14 +25,8 @@ def setFailureCheck(String name, String title) {
*/
def stageWithChecks(String name, Closure body) {
stage(name) {
try {
body()
setSuccessCheck(name, name)
} catch (error) {
sh "echo Stage $name failed with error: $error"
setFailureCheck(name, name)
throw error
}
body()
setSuccessCheck(name, name)
}
}
/* -------------------------------------------------------------------------- */