Last active
June 16, 2025 01:57
-
-
Save bauidch/a8f245074aa5f77713859f6c1272fce8 to your computer and use it in GitHub Desktop.
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 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("[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