-
Bug
-
Resolution: Unresolved
-
Minor
-
None
A try / finally which fails in the try block and has more than one finally statement will display the try block's failure with the last statement and show it as failed.
This works (see one finally statement.png):
def jobs = [:] ['1', '2'].each { it -> jobs[it] = { node('master') { try { sh 'exit 1' } finally { echo "Cleanup 1" } } } } parallel jobs
This does not (see two/three finally statements.png):
def jobs = [:] ['1', '2'].each { it -> jobs[it] = { node('master') { try { sh 'exit 1' } finally { echo "Cleanup 1" echo "Cleanup 2" // echo "Cleanup 3" } } } } parallel jobs