Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37672

multibranch pipeline with SVN additional credentials

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • Jenkins master : Debian linux 64bit, Jenkins 2.16, pipeline multibranch plugin 1.10, pipeline scm plugin 2.2, subversion plugin 2.6
      Jenkins slaves : win7, win10, debian (all 64 bit)

      We use SVN with a lot of externals. As we know from JENKINS-21785, we need to provide additional credentials for the change detection to work reliably.

      However, when migrating to pipeline, trying to setup a multibranch pipeline job, there is no option to provide these additional credentials. This results in our pipeline jobs failing 1 in 3 times during SVN change detection in branch indexing (ie: before any Jenkinsfile code runs).

          [JENKINS-37672] multibranch pipeline with SVN additional credentials

          Aaron Miller added a comment -

          You may possibly set this in the Jenkinsfile as a temporary workaround, I am using the following function in my Jenkinsfile to do a checkout from SVN.

          //source: Jenkins Snippet Generator
          def svco(remote, local=".", ignoreExternals=false) {
              checkout([$class: 'SubversionSCM', 
                additionalCredentials: [], 
                excludedCommitMessages: '', 
                excludedRegions: '', 
                excludedRevprop: '', 
                excludedUsers: '', 
                filterChangelog: false, 
                ignoreDirPropChanges: false, 
                includedRegions: '', 
                locations: [[credentialsId: '..TRIMMED..', 
                             depthOption: 'infinity', 
                             ignoreExternalsOption: ignoreExternals, 
                             local: local, 
                             remote: remote]], 
                workspaceUpdater: [$class: 'UpdateUpdater']])
          

          There is a spot for additionalCredentials, which I would assume accepts an object similar to the one specified in your old config.xml.

          Aaron Miller added a comment - You may possibly set this in the Jenkinsfile as a temporary workaround, I am using the following function in my Jenkinsfile to do a checkout from SVN. //source: Jenkins Snippet Generator def svco(remote, local= "." , ignoreExternals= false ) { checkout([$class: 'SubversionSCM' , additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false , ignoreDirPropChanges: false , includedRegions: '', locations: [[credentialsId: '..TRIMMED..' , depthOption: 'infinity' , ignoreExternalsOption: ignoreExternals, local: local, remote: remote]], workspaceUpdater: [$class: 'UpdateUpdater' ]]) There is a spot for additionalCredentials, which I would assume accepts an object similar to the one specified in your old config.xml.

          Aaron this issue happens during change detection, so before any code in the pipeline script is executed.

          Pieter-Jan Busschaert added a comment - Aaron this issue happens during change detection, so before any code in the pipeline script is executed.

          Niels Wegner added a comment -

          This seems to be a duplicate of JENKINS-35227

          Niels Wegner added a comment - This seems to be a duplicate of JENKINS-35227

            jglick Jesse Glick
            pjaytycy Pieter-Jan Busschaert
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: