Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables to create user + password #938

Open
HariSekhon opened this issue Mar 28, 2020 · 2 comments
Open

Environment variables to create user + password #938

HariSekhon opened this issue Mar 28, 2020 · 2 comments

Comments

@HariSekhon
Copy link

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.

@mhagnumdw
Copy link

Is it currently possible to do this in any way?

@HariSekhon
Copy link
Author

HariSekhon commented May 14, 2020

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

https://github.com/HariSekhon/DevOps-Bash-tools/blob/master/jenkins/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/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/jenkins_cli.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants