Jenkinsfile

main
liangjiajie 1 year ago
parent 19a22f7944
commit 845789777a

11
Jenkinsfile vendored

@ -14,16 +14,7 @@ pipeline {
}
stage('Execute Shell Command') {
steps {
script {
try {
// 尝试执行shell命令
sh label: '', script: 'echo 123'
} catch (err) {
// 如果执行时发生异常,则捕获并打印错误信息
echo "Shell command execution failed: ${err.getMessage()}"
// 这里还可以添加其他处理错误的逻辑,比如发送通知、清理资源等
}
}
sh returnStdout: true, script: 'echo 123'
}
}
stage('sonar质量检测') { // 阶段3:使用Sonar进行代码质量检测

Loading…
Cancel
Save