Re: Jenkins Pipeline to be generic

2018-04-17 Thread krish
Thanks Guys. That works

On Thursday, 12 April 2018 15:06:19 UTC-4, krish wrote:
>
> Hi,
>
> how can we use the multiple credentials into jenkins pipeline, in our 
> environment diff applications have diff userid and password, is their a 
> smarter way to define this in jenkins pipeline
>
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/13b35b68-b640-404c-89bf-871788bd3824%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline to be generic

2018-04-14 Thread Srivathsa Reddy
For multiple usages of withCredentials:

node {
withCredentials([[$class: 'UsernamePasswordMultiBinding',
  credentialsId: "TokenID_1",
  usernameVariable: 'USERNAME_1',
  passwordVariable: 'PASSWORD_1']]) {

  stage('stage1'){

  

  }

}
withCredentials([[$class: 'UsernamePasswordMultiBinding',
  credentialsId: "TokenID_2",
  usernameVariable: 'USERNAME_2',
  passwordVariable: 'PASSWORD_2']]) {

  stage('stage2'){

  

  }

}
}




On Fri, Apr 13, 2018 at 6:12 PM,  wrote:

> You can use *withCredentials*
>
> https://jenkins.io/doc/pipeline/steps/credentials-binding/
>
>
> On Thursday, April 12, 2018 at 3:06:19 PM UTC-4, krish wrote:
>>
>> Hi,
>>
>> how can we use the multiple credentials into jenkins pipeline, in our
>> environment diff applications have diff userid and password, is their a
>> smarter way to define this in jenkins pipeline
>>
>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/d8855c70-3343-4fce-862c-1293ffb3ce1a%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAFB%2B0W6VLjZc5NTkgoEgW6OBWw7Q2WZjn%3DFD%2BwOGkXD8S5pxeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline to be generic

2018-04-13 Thread srivathsa . puliyala
You can use *withCredentials*

https://jenkins.io/doc/pipeline/steps/credentials-binding/


On Thursday, April 12, 2018 at 3:06:19 PM UTC-4, krish wrote:
>
> Hi,
>
> how can we use the multiple credentials into jenkins pipeline, in our 
> environment diff applications have diff userid and password, is their a 
> smarter way to define this in jenkins pipeline
>
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d8855c70-3343-4fce-862c-1293ffb3ce1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.