LNX-453:- Prevent Jenkins build from failing when execute shell step fails (#13300)
This commit is contained in:
parent
58069ea225
commit
1b25127d89
@ -0,0 +1,16 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('tryCatch') {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'test_script.sh'
|
||||
} catch (e) {
|
||||
echo "An error occurred: ${e}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user