我正在尝试将自由式项目转换为jenkins管道。在执行此操作时,我尝试从SVN结帐。我正在使用以下代码。但是这里的问题是,它正在子文件夹“ testProject”(/ etc / jenkins / workspace / testJob / testProject)中检出,而不是在工作空间(/ etc / jenkins / workspace / testJob)中检出。
stage('SVN Checkout') {
steps {
catchError(buildResult: 'FAILURE', message: 'SVN Checkout Failure', stageResult: 'FAILURE') {
cleanWs()
checkout([$class: 'SubversionSCM',
additionalCredentials: [],
excludedCommitMessages: '',
excludedRegions: '',
excludedRevprop: '',
excludedUsers: '',
filterChangelog: false,
ignoreDirPropChanges: false,
includedRegions: '',
locations: [[cancelProcessOnExternalsFail: true,
credentialsId: '3d959e12-60cc8f9a553d',
depthOption: 'infinity',
ignoreExternalsOption: true,
remote: 'http://<SVN URL>/testProject']],
quietOperation: true,
local: '.',
workspaceUpdater: [$class: 'UpdateUpdater']])
}
}
}
我什至尝试了dir('/ etc / jenkins / workspace / testJob')和ws('/ etc / jenkins / workspace / testJob'),但在结帐时仍会在工作区中创建“ testProject”文件夹。 / p>
我如何在当前工作区目录中而不是在子文件夹中检出代码