How do I inject credentials into a build ?

Asked by Wolfgang Gerlach

I'd like to inject a password into a build. Can I use build_job() for that or would that be insecure? I do not want the password to be viewable in the build log of course.

Another alternative would be to use Jenkins credentials. Can I use Python Jenkins to create credentials ? (I do not like the idea of manually inserting credentials via the Jenkins UI)

thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Python Jenkins Edit question
Assignee:
No assignee Edit question
Solved by:
Wolfgang Gerlach
Solved:
Last query:
Last reply:
Revision history for this message
Wolfgang Gerlach (wgerlach) said :
#1

I solved this using "Jenkins Configuration as Code" https://www.jenkins.io/projects/jcasc/.