pipeline buildResult 和 stageResult的区别

pipeline{
    environment{
        localPath = '/Users/jasqia/Desktop'
        mvn='/usr/local/Cellar/maven/3.8.1/libexec/bin/mvn'
        dev_host='localhost:8084'
        qa_host='localhost:8083'
        cert_host='localhost:8089'
    }
    agent any
    stages{
      stage('1'){      
            steps{  
                catchError(buildResult: 'FAILURE', stageResult: 'SUCCESS') {
                   sh '''mvn -version'''        
                }                                                                             
            }    
            post{
              failure {
                  print "111111fail"   
              }
            }      
         }
     
  stage('2222'){      
        steps{  
            catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
              print "22222"         
            }                                                                             
        }        
         post{
          failure {
              print "2222222fail"    
          }
        }        
     }
}

post{
   failure {
      print "failure"   
   }
   unstable {
      print "unstable"   
   }
}
}

  

上一篇:Redis缓存雪崩,穿透、multiGet 批量查询优化、pipeline 批量查询优化


下一篇:开源基于docker的任务调度器pipeline,比`quartzs` 更强大的分布式任务调度器