I am trying to inject my credentials to a Jenkins Freestyle project.
The project is building a python project in virtual environment with "behave" created with ShiningPanda plugin
can someone help me ? thanks
DevOps Stack Exchange is a question and answer site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure. It only takes a minute to sign up.Sign up to join this community
In order to pass masked credentials to your Jenkins job, do the following:
In Jenkins, install Credentials Binding plugin.
In your Jenkins, go to Credentials and click the global domain.
In the left pane, click "Add credential".
From the "Kind" dropdown, choose "Username with password".
Enter the username and password in the reflective boxes and choose an ID (you will use this ID when you want to access the credentials) and click OK.
Then, in your job, under "Build environment", check "Use secret text(s) or file(s)" and it will add a "Binding" section and an "Add" button, click the "Add" button and "username and password separated", choose a variable name to hold the username and another to hold the password and choose the credentials you created earlier from the credentials dropdown.
Then, in the "Build" section of the job, you can access the credentials using your chosen username and password variables.
I wrote an article about this subject in the past so feel free to check it for more detailed explanation and screen shots.