Skip to content

Commit d152d92

Browse files
authored
LNX-453:- Prevent Jenkins build from failing when execute shell step fails (eugenp#13300)
1 parent d790a0e commit d152d92

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pipeline {
2+
agent any
3+
stages {
4+
stage('tryCatch') {
5+
steps {
6+
script {
7+
try {
8+
sh 'test_script.sh'
9+
} catch (e) {
10+
echo "An error occurred: ${e}"
11+
}
12+
}
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)