2017-07-27 41 views

回答

2

pre是一个很酷的功能的想法,但还不存在。 skipDefaultCheckoutcheckout scm(与默认结帐相同)是关键字:

pipeline { 
    agent { label 'docker' } 
    options { 
    skipDefaultCheckout true 
    } 
    stages { 
    stage('clean_workspace_and_checkout_source') { 
     steps { 
     deleteDir() 
     checkout scm 
     } 
    } 
    stage('build') { 
     steps { 
     echo 'i build therefore i am' 
     } 
    } 
    } 
}