My Jenkinsfile calls an ansible playbook module to login into dockerhub.
docker_login: username: username password: mypasswordexample
What is a way I can hide the password in this playbook file as don't want it stored in scm this way. Currently my jenkins job calls this playbook via a Jenkinsfile using this shell command sh "scp -o StrictHostKeyChecking=no ansibleplayboook.yaml admin@serverip:/home/admin"
sh "scp -o StrictHostKeyChecking=no ansibleplayboook.yaml admin@serverip:/home/admin"
I was thinking of using jenkins credentials but not sure how to inject and use in the jenkinsfile. Any help or pointers would be greatly appreciated. Thanks Brian
1.4m articles
1.4m replys
5 comments
56.9k users