I am trying to create a user and password for Jenkins using JCASC. I can set up Jenkins however when I go to the GUI on my local host I do not see any users. Here is my code
jenkins:
systemMessage: "Jenkins configured automatically by Jenkins Configuration as Code pluginnn"
disabledAdministrativeMonitors:
- "jenkins.diagnostics.ControllerExecutorsNoAgents"
credentials:
system:
domainCredentials:
- credentials:
- usernamePassword:
id: "admin-cred"
username: "jenkins-admin"
password: "butler"
scope: GLOBAL
I believe I have all the necessary plugins installed but something is missing clearly. Any help would be appreciated.
2
Answers
The way I got users to pop up is by setting up the (local) security realm, rather than credentials, like so:
I’m finding this a great resource to get ideas from: https://github.com/oleg-nenashev/demo-jenkins-config-as-code
I’ve used a local security Realm with disabled signups to add the user "jenkins-admin".
You can refer below links to know more about Jcasc: