docker icon indicating copy to clipboard operation
docker copied to clipboard

Environment variables to create user + password

Open HariSekhon opened this issue 4 years ago • 2 comments

Would it be possible to add support for JENKINS_USER and JENKINS_PASSWORD environment variables to auto-create a user to work with at boot?

Digging out the admin password would then be unnecessary and make it easier to script deterministic usage of Jenkins in docker.

HariSekhon avatar Mar 28 '20 16:03 HariSekhon

Is it currently possible to do this in any way?

mhagnumdw avatar May 12 '20 21:05 mhagnumdw

I just find the admin password and start issuing commands, eg. this script:

https://github.com/HariSekhon/DevOps-Bash-tools/blob/master/jenkins.sh#L83

which calls this script below to find the password before continuing to issue jenkins cli commands:

https://github.com/HariSekhon/DevOps-Bash-tools/blob/master/jenkins_password.sh

I also have a jenkins_cli.sh script to minimize the amount of arguments and make calls simpler (I have a lot of convenience scripts in this repo):

https://github.com/HariSekhon/DevOps-Bash-tools/blob/master/jenkins_cli.sh

HariSekhon avatar May 14 '20 11:05 HariSekhon