如何在流水线脚本中设置浅克隆
script {
def gitSCM = [
$class: 'GitSCM',
branches: [[name: '*/' + sourceBranch]],
extensions: [[
$class: 'CloneOption',
depth: 1,
noTags: false,
shallow: true
]],
userRemoteConfigs: [[
url: sourceRepo,
credentialsId: gitAuthority
]]
]
checkout(gitSCM)
}