exception handling take 3

This commit is contained in:
Dominik Chilla 2020-07-11 23:48:19 +02:00
parent 3f9337752f
commit 9941894a4f

3
Jenkinsfile vendored
View File

@ -7,7 +7,6 @@ pipeline {
stage('Approve'){
steps {
script {
import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
def userInput
try {
timeout(time: 5, unit: 'SECONDS') {
@ -18,7 +17,7 @@ pipeline {
name: 'Please confirm you agree with this'
]])
}
} catch(FlowInterruptedException e) {
} catch(org.jenkinsci.plugins.workflow.steps.FlowInterruptedExceptionedException e) {
echo "This job timed out"
} catch(err) { // input false
echo "This job has been aborted"