[JIRA] (JENKINS-38963) User-scoped credentials cannot be looked up with pipeline

4 views
Skip to first unread message

vehovsky@gmail.com (JIRA)

unread,
Oct 13, 2016, 8:16:04 AM10/13/16
to jenkinsc...@googlegroups.com
Martin Vehovsky created an issue
 
Jenkins / Bug JENKINS-38963
User-scoped credentials cannot be looked up with pipeline
Issue Type: Bug Bug
Assignee: Unassigned
Components: credentials-binding-plugin
Created: 2016/Oct/13 12:15 PM
Priority: Major Major
Reporter: Martin Vehovsky

It's possible to look-up User-scoped credentials in Freestyle jobs with Bindings. The same seems not to works in pipeline jobs.

node {
    withCredentials([[$class          : 'UsernamePasswordMultiBinding', credentialsId: 'bc047678-37b8-4747-95d8-c1a8b3df51a6',
                      usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
        echo "${env.USERNAME}"
    }
}
org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: bc047678-37b8-4747-95d8-c1a8b3df51a6
	at org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials(MultiBinding.java:124)
	at org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding.bind(UsernamePasswordMultiBinding.java:68)
	at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution.start(BindingStep.java:92)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages