Skip to content

Instantly share code, notes, and snippets.

@akash0x53
Created November 21, 2016 12:29
Show Gist options
  • Save akash0x53/e4f24cedff133f53ecb058656116e9f9 to your computer and use it in GitHub Desktop.
Save akash0x53/e4f24cedff133f53ecb058656116e9f9 to your computer and use it in GitHub Desktop.
def users=
[
[name: "User1",
email: "[email protected]"
],
]
import hudson.tasks.Mailer
users.each{
def new_user = jenkins.model.Jenkins.instance.securityRealm.createAccount(it.name, "vzrobotvz")
new_user.addProperty(new Mailer.UserProperty(it.email));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment