A pipeline that alwayss fail
pipeline {
agent any
stages {
stage('build') {
steps {
retry(3) {
sh '''
R=$(od -An -N1 -i /dev/random)
echo trying flakey...
[ $((R % 3)) -eq 0 ] && exit 1
'''
}
timeout(time: 5, unit: 'SECONDS') {
sh '''
R=$(od -An -N1 -i /dev/random)
sh 'echo trying slow...
[ $((R % 3)) -eq 0 ] && sleep 10
'''
}
}
}
}
}
Comments
0 B
|0 👍
/0 👎
0 B
|👍
/👎