-
-
Save sj26/8819aac024ba474666516228a7995868 to your computer and use it in GitHub Desktop.
Create a Jenkins user via Groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.* | |
import hudson.tasks.Mailer | |
def user = Jenkins.instance.securityRealm.createAccount("username", "Amin12345#") | |
user.addProperty(new Mailer.UserProperty("[email protected]")); | |
user.setFullName("Full Name") | |
user.setDescription("Account via groovy generated") | |
user.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment