How can I pass the userName and password from jenkins

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I pass the userName and password from jenkins

Sanjay Kumar
Hi All,

My current project is based on Cucumber+Java+Selenium+Maven. And I am reading userName and password from the CSV file.

But I want to pass the userName and password from the Jenkins. 

Kindly help me how to do?

Thank you in advance!
Sanjay

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/354182b5-6af1-44d3-ba25-d1d5030c8869%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

How can I pass the userName and password from jenkins

Ivan Fernandez Calvo
Hi,

Here you have a couple of links that explain you how credentials works

https://jenkins.io/doc/book/using/using-credentials/
https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs

Also, I’d recommend to take a look to the documentation https://jenkins.io/doc/book/ and tutorials https://jenkins.io/doc/tutorials/ probably you find useful information

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0d10b865-9edb-49a2-857e-6a770f390ed9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How can I pass the userName and password from jenkins

Sanjay Kumar
Hi Ivan,

Thank you for sharing the links, Sure I will look in it.

Scenario: In my application, we have around 100 users with a different role, and currently maintaining in all 100user in a CSV file and reading from csv using java code and passing to selenium to login in application. But now I want to pass user from the jenkis-> maven-> test scripts.

could you please help me how to implement using jenkins->maven-> testscripts?



On Sat, Jul 13, 2019 at 3:40 PM Ivan Fernandez Calvo <[hidden email]> wrote:
Hi,

Here you have a couple of links that explain you how credentials works

https://jenkins.io/doc/book/using/using-credentials/
https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs

Also, I’d recommend to take a look to the documentation https://jenkins.io/doc/book/ and tutorials https://jenkins.io/doc/tutorials/ probably you find useful information

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0d10b865-9edb-49a2-857e-6a770f390ed9%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMdj%2Bm9gam5GN6KaJnkqUGQ5aHSR0S%3DfA4cLKdyFjs93N_VUFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How can I pass the userName and password from jenkins

Ivan Fernandez Calvo
I understand that you want to run the same thing 100 times with different users, or something like that, so you have the easy one that it is to use a credential de type file where you store you current CVS file, in this case it does not change too much you current process, you retrieve the file from credentials and store it on a local file.

Other option is to maintain a set of credentials with some kind if pattern as I'd, in that way you can iterate over the 100 credentials.

Finally, if you have the possibility of use Vault or something like that you can retrieve your user*password from the Vault.

All depends on the level of security you need for those 100 credentials.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6ef2c60c-c22f-4fec-8bcc-39ec1ba03de3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.