We have been using Jenkins for Continuous Integration for some time. A typical build job specifies the SVN repository and credentials in the \"Source Code Management\" secti
So, we had A LOT of problems getting this to work. Here is how we solved the problem:
In Jenkins you make a Pipeline Job. The only contents that are required in this job are:
@monthly)Every other setting goes into the Jenkinsfile. However:
triggers {
pollSCM('@monthly')}
Should STILL be specified in your Jenkinsfile even though it is already specified in your job.
However, as zionyx said you need to checkout before you do anything else. In our case we wanted to avoid this for many reasons. Luckily it still works if you have:
depthOption: 'empty'.
Finally, you need to manually start the first job run.
We made a little function that you can perhaps use:
def checkoutSVN(Boolean ignoreExternalsOption, String local, String remote, String updater) {
checkout([$class: 'SubversionSCM',
additionalCredentials:
[[credentialsId: 'get-this-from-your-jenkins',
realm: ' CollabNet Subversion Repository']],
excludedCommitMessages: '',
excludedRegions: '',
excludedRevprop: '',
excludedUsers: '',
filterChangelog: false,
ignoreDirPropChanges: false,
includedRegions: '',
locations: [[credentialsId: 'get-this-from-your-jenkins',
depthOption: 'empty',
ignoreExternalsOption: ignoreExternalsOption,
local: local,
remote: remote]],
quietOperation: false,
workspaceUpdater: [$class: updater]])}