stages { stage('拉取源码') { steps { checkout([ //详情看https://www.cnblogs.com/liucx/ $class: 'GitSCM', branches: [[name: "${branch}"]], doGenerateSubmoduleConfigurations: false,extensions: [[$class:'CheckoutOption',timeout:30],[$class:'CloneOption',depth:0,noTags:false,reference:'',shallow:false,timeout:30]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github', url: "${project_url}"]] ]) } }