Skip to content

Commit

Permalink
Enable Jenkins agent to master access control
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert A. Northard committed May 15, 2018
1 parent f5ab77c commit d0c2fa5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resources/init.groovy.d/adop_slave_master_access_control.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import jenkins.model.*
import jenkins.security.s2m.AdminWhitelistRule

Thread.start {
sleep 3000

println "--> Enabling slave master access control"

Jenkins.instance.injector.getInstance(AdminWhitelistRule.class).setMasterKillSwitch(false);

Jenkins.instance.save()
}

0 comments on commit d0c2fa5

Please sign in to comment.