Last active
August 5, 2021 08:18
-
-
Save bauidch/a8f245074aa5f77713859f6c1272fce8 to your computer and use it in GitHub Desktop.
This file contains 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 hudson.model.* | |
import hudson.security.* | |
import hudson.tasks.Mailer | |
def instance = jenkins.model.Jenkins.instance | |
def user = instance.securityRealm.createAccount("username", "Amin12345#") | |
user.addProperty(new Mailer.UserProperty("name@mail.com")); | |
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