2017-07-27 56 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' 
     } 
    } 
    } 
}