diff options
Diffstat (limited to 'tools/moon_jenkins/security.groovy')
-rw-r--r-- | tools/moon_jenkins/security.groovy | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/tools/moon_jenkins/security.groovy b/tools/moon_jenkins/security.groovy deleted file mode 100644 index 0fb5ff6e..00000000 --- a/tools/moon_jenkins/security.groovy +++ /dev/null @@ -1,20 +0,0 @@ -#!groovy - -import jenkins.model.* -import hudson.security.* - -def instance = Jenkins.getInstance() - -def user = System.getenv()['jenkins_user'] -def pass = System.getenv()['jenkins_password'] -// Create user account -def hudsonRealm = new HudsonPrivateSecurityRealm(false) -hudsonRealm.createAccount(user,pass) -instance.setSecurityRealm(hudsonRealm) - -// Enable matrix auth strategy and set my_user as admin -def strategy = new GlobalMatrixAuthorizationStrategy() -strategy.add(Jenkins.ADMINISTER, user) -instance.setAuthorizationStrategy(strategy) - -instance.save() |