Sfoglia il codice sorgente

Jenkinsfile错误处理修改

huqi 6 anni fa
parent
commit
1ff235fbeb
1 ha cambiato i file con 2 aggiunte e 6 eliminazioni
  1. 2 6
      Jenkinsfile

+ 2 - 6
Jenkinsfile

@@ -3,12 +3,8 @@ pipeline {
     stages {
         stage('preperation') {
             steps {
-                script {
-                    try {
-                        sh 'target/o2server/stop_linux.sh'
-                    } catch (err) {
-                        echo err
-                    }
+                catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+                    sh 'target/o2server/stop_linux.sh'
                 }
                 sh 'npm install'
                 sh 'npm run preperation:linux'