Advertisement
Guest User

Untitled

a guest
Dec 31st, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.33 KB | None | 0 0
  1.  pipeline {
  2.      stage('deploy-test') {
  3.            try {
  4.                 sh 'echo "Fail!"; exit 1'  
  5.            } catch(error) {
  6.                 echo "First build failed, let's retry if accepted"
  7.                 retry(2) {
  8.                     input "Retry the job ?"
  9.                     echo 'HI'
  10.             }
  11.        }
  12.     }
  13.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement