Procházet zdrojové kódy

Jenkinsfile错误处理修改

huqi před 6 roky
rodič
revize
1ff235fbeb
1 změnil soubory, kde provedl 2 přidání a 6 odebrání
  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'