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

multibranch pipeline with SVN additional credentials

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Labels:
      None
    • Environment:
      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)
    • Similar Issues:

      Description

      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).

        Attachments

          Issue Links

            Activity

            Hide
            drkstr101 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.

            Show
            drkstr101 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.
            Hide
            pjaytycy Pieter-Jan Busschaert added a comment -

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

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

            This seems to be a duplicate of JENKINS-35227

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: