如何为大型项目实施 Jenkins 管道以进行浅存储库克隆/签出 SVN(Subversion 存储库),因为每次触发 Jenkins 管道时,它都会执行“清理本地目录”并一次又一次地克隆整个项目?
我的詹金斯文件:
node {
checkout([$class: 'SubversionSCM',
additionalCredentials: [],
excludedCommitMessages: '',
excludedRegions: '',
excludedRevprop: '',
excludedUsers: '',
filterChangelog: false,
ignoreDirPropChanges: false,
includedRegions: '',
locations: [[credentialsId: 'DevOpsAshishSvn',
depthOption: 'infinity',
ignoreExternalsOption: true,
// local: 'cable_branch',
remote: "https://xyz207.net.com/svn/Simulator/releases/beta"]],
workspaceUpdater: [$class: 'UpdateUpdater']])
stage (‘Build’) {
def workspace = WORKSPACE
def jobname = JOBNAME
def fullpatname = "${workspace}\${jobname}\beta"
bat "dir"
dir($fullpatname) {
bat "dir"
bat "svn upgrade"
bat "C:\\Program Files\\Unity\\Hub\\Editor\\2019.1.2f1\\Editor\\Unity.exe -quit -batchmode -nographics -execute\$\$anonymous\$\$ethod JenkinsBuild.PerformWindowsBuild -nolog"
}
}
}
我应该在此代码中添加什么Jenkinsfile
作为浅存储库克隆并避免冗余克隆 SVN 存储库中的代码?