Building on the same problem.
I do the following until the patch for the SVN plugin is fixed.
currentBuild.getChangeSets().clear() checkout scm
Note: you may need to approve script calls through the "In-process script approval" page.
This will clear the change log from Jenkins Job. The change log will again be populated with a checkout scm call. UPDATE. Check out my changes below. This “solution” does not work because it adds back the deleted revisions after the reboot ... I don’t understand why, but ...
EDIT:
Now I have found a new way:
for(i = 0; i < scm.getLocations().length; i++) { def location = scm.getLocations()[i] def svn_url = location.remote checkout changelog: false, poll: false, scm: [$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[credentialsId: '252ad9ab-2f39-46f5-a77a-6196d1679dee', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: svn_url]], workspaceUpdater: [$class: 'UpdateWithRevertUpdater']] }
You must use the Piping Syntax page to get the correct credentials. I tried to use only
checkout changelog: false, scm
but it didn’t work. Therefore, you need to use the long version shown above.