exception handling take 5
This commit is contained in:
parent
74d6924cf6
commit
e1b09d634b
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -8,7 +8,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def userInput
|
def userInput
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'ABORTED') {
|
//catchError(buildResult: 'SUCCESS', stageResult: 'ABORTED') {
|
||||||
try {
|
try {
|
||||||
timeout(time: 15, unit: 'SECONDS') {
|
timeout(time: 15, unit: 'SECONDS') {
|
||||||
userInput = input(id: 'Proceed1', message: 'Was this successful?', parameters: [[
|
userInput = input(id: 'Proceed1', message: 'Was this successful?', parameters: [[
|
||||||
@ -23,7 +23,7 @@ pipeline {
|
|||||||
} catch(err) { // input false
|
} catch(err) { // input false
|
||||||
echo "This job has been aborted"
|
echo "This job has been aborted"
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
if (userInput == true) {
|
if (userInput == true) {
|
||||||
// do something
|
// do something
|
||||||
echo "this was successful"
|
echo "this was successful"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user