The snippet generator has solved this for me:

additionalCredentials: [[credentialsId: '<snip>', realm: '']],

From: David Aldrich
Sent: 20 April 2017 16:29
To: 'thomas.lehm...@teamaol.com' <thomas.lehm...@teamaol.com>; Jenkins Users 
<jenkinsci-users@googlegroups.com>
Subject: RE: How to specify svn credentialsId in pipeline job?

Hi Thomas

The credentialsId is now working fine for me, thanks for your help.

However, my svn checkout involves an external, which is not appearing in the 
workspace.  I guess I need to specify ‘additional credentials’.  I tried:

stage('Checkout') {
    checkout([$class: 'SubversionSCM',
        additionalCredentials: [credentialsId: 
'086c0d1a-15e7-4cea-9702-7528ac021fab'],
        excludedCommitMessages: '',
        excludedRegions: '',
        excludedRevprop: '',
        excludedUsers: 'buildbot',
        filterChangelog: false,
        ignoreDirPropChanges: false,
        includedRegions: '',
        locations: [[credentialsId: '086c0d1a-15e7-4cea-9702-7528ac021fab',
            depthOption: 'infinity',
            ignoreExternalsOption: true,
            local: '.',
            remote: "https://172.29.68.12/subversion/Leda/trunk/";]],
        workspaceUpdater: [$class: 'UpdateUpdater']])
}

But that failed. I think my setting for additionalCredentials is wrong.  Can 
you help me correct the syntax please?

Best regards

David


From: thomas.lehm...@teamaol.com<mailto:thomas.lehm...@teamaol.com> 
[mailto:thomas.lehm...@teamaol.com]
Sent: 20 April 2017 12:48
To: Jenkins Users 
<jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com>>
Cc: thomas.lehm...@teamaol.com<mailto:thomas.lehm...@teamaol.com>; David 
Aldrich <david.aldr...@emea.nec.com<mailto:david.aldr...@emea.nec.com>>
Subject: Re: How to specify svn credentialsId in pipeline job?

You assing it to the parameter credentialsId.

On Thursday, April 20, 2017 at 1:13:20 PM UTC+2, David Aldrich wrote:
Thanks, I see it now. The credential does have a readable name.  Can I assign 
that name to credentialsId or should it be assigned to a different property?

From: thomas....@teamaol.com<javascript:> 
[mailto:thomas....@teamaol.com<javascript:>]
Sent: 20 April 2017 12:11
To: Jenkins Users <jenkins...@googlegroups.com<javascript:>>
Cc: thomas....@teamaol.com<javascript:>; David Aldrich 
<david....@emea.nec.com<javascript:>>
Subject: Re: How to specify svn credentialsId in pipeline job?

Click on the link an a table is shown and there is the columns ID ...
One note: if you forgot to provide a readable name you cannot change it. You 
have to re-create it then.

On Thursday, April 20, 2017 at 1:07:53 PM UTC+2, 
thomas....@teamaol.com<mailto:thomas....@teamaol.com> wrote:
When you click top/left on "Jenkins" (navigate to the mainpage) the link to the 
credentials
should appear on the left side (short before build queue).

On Thursday, April 20, 2017 at 12:59:31 PM UTC+2, David Aldrich wrote:
Thanks for your reply. I am an admin so I should be able to see everything.  
Where should I look for the credentials?

All our conventional jobs use the following credential seen on the job 
configuration page:

[https://lh5.googleusercontent.com/proxy/2i_Y0VgsbT3dDPnTx8xHlJoAJ_X4wU49L48fmjFQl1Fn6JpdOKhrhD0teLxJBFM-h17yECb8qRBvV3aQbAPzSIwIT5vm7Ak0yey-kZhQVShbsOe17M_qRCFv6oz4XJwVf23Pci55b2Vkj5i1xVVVGV48EKaXLdOi=w5000-h5000]

Where should I look for the corresponding credentialId?

Best regards

David

From: thomas....@teamaol.com<mailto:thomas....@teamaol.com> 
[mailto:thomas....@teamaol.com]
Sent: 20 April 2017 11:39
To: Jenkins Users 
<jenkins...@googlegroups.com<mailto:jenkins...@googlegroups.com>>
Cc: David Aldrich <david....@emea.nec.com<mailto:david....@emea.nec.com>>
Subject: Re: How to specify svn credentialsId in pipeline job?

Usually the adminstrator of a Jenkins is reponsible to register credentials
with a useful (readable) name. If those admin forget to give a name Jenkins
does it for your which results usually in something like this: 
"b86bc2b6-994b-4811-ac98-0f35e9a9b114'

Of course you don't wanna have such ID's in your coded pipeline. Consider
you might have running your pipeline on different Jenkins providing the same
credentials (names) your project should be able to build without code changes.

It might be a permission thing that you cannot see the credentials.


On Wednesday, April 19, 2017 at 1:19:15 PM UTC+2, David Aldrich wrote:
Hi

I have created a simple pipeline job that is intended just to check out a 
working copy from svn initially.

Here's the script:

node {
   echo 'Hello World'

   stage('Checkout') {
      checkout([$class: 'SubversionSCM',
          additionalCredentials: [],
          excludedCommitMessages: '',
          excludedRegions: '',
          excludedRevprop: '',
          excludedUsers: 'buildbot',
          filterChangelog: false,
          ignoreDirPropChanges: false,
          includedRegions: '',
          locations: [[credentialsId: 'b86bc2b6-994b-4811-ac98-0f35e9a9b114',
                               depthOption: 'infinity',
                               ignoreExternalsOption: true,
                               local: '.',
                               remote: "<snip>"]],
          workspaceUpdater: [$class: 'UpdateUpdater']])
  }
}

Is the script valid?

How do I determine the 'credentialsId' ?   (I have credentials set up in 
non-pipeline jobs already).

Best regards

David


Click 
here<https://www.mailcontrol.com/sr/PS9zzq4a5Y!GX2PQPOmvUs3oG7lEfVxCzPPmYDypv14txLmT1cqnLRGjWI!kNRHHlpLFCZWcu8GsCq9I+zBdpQ==>
 to report this email as spam.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9371de40f65f45e0921e46c47614bc16%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

Reply via email to