首页 > 其他 > 详细

pipeline buildResult 和 stageResult的区别

时间:2021-07-29 22:27:56      阅读:28      评论:0      收藏:0      [点我收藏+]
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"   
   }
}
}

  

pipeline buildResult 和 stageResult的区别

原文:https://www.cnblogs.com/qianjinyan/p/15076898.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!