Hi Raja,

Did you have any success with this? I'm using the withCredentials syntax in 
a build but I can't use/access the variables stored globally. Also for a 
pipeline project there isn't the option of including the variables in the 
build from the Configure page like you get from a freestyle project. 

On Tuesday, November 29, 2016 at 7:36:10 PM UTC, Raja Chinnam wrote:
>
> Hello
>
> How can I pass the username and password to my a custom application in the 
> pipeline?
> I have username and password added as credentials and am using this code:
>
> withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 
> 'usrid', passwordVariable: 'USR', usernameVariable: 'PWD']]) {
> bat '''
> echo off
> Query.exe -u %USR% -p %PWD%
> '''
> }
>
> my application fails with the message: 'invalid user "****"'
>
> thank you.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a983dffe-c336-497a-97b5-acd4de2caf9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to