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

System scope Maven global settings.xml doesn't provide serverIds when using multibranch pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins ver. 2.150.1

      Problem reproduce steps:

      1. Credentials > System > Add Domain A, just has name specified.
      2. In domain A, add a credential C, username: maven repo username, password: maven repo password.
      3.  Manage Jenkins > Managed files, create a maven global settings.xml M, add Server Credentials using credential C.
      4. Create a Multibranch pipeline, in Pipeline Maven Configuration section, using config M.
      5. Run pipeline.

      Build log:

      [withMaven] using Maven global settings.xml '876cdf5c-802b-4252-a062-4b9d8602dd06' 
         with NO Maven servers credentials provided by Jenkins
      

      If I create credential C and maven global settings.xml M inside Multibranch pipeline, everything goes fine:

      [withMaven] using Maven global settings.xml 'f657ec5c-cc63-4730-a133-7e58c3ea433a' with Maven servers credentials 
         provided by Jenkins (replaceAll: true): 
         [mavenServerId: 'supwisdom-snapshots', jenkinsCredentials: '250947bb-2ce2-4cf5-b62f-bba7e2af7df0', username: 'deployment', type: 'UsernamePasswordCredentialsImpl'], 
         [mavenServerId: 'supwisdom-releases', jenkinsCredentials: '250947bb-2ce2-4cf5-b62f-bba7e2af7df0', username: 'deployment', type: 'UsernamePasswordCredentialsImpl']
      

       

            cleclerc Cyrille Le Clerc
            chanjarster Daniel Qian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: