Skip to content

Instantly share code, notes, and snippets.

@whittlec
whittlec / gist:6105743
Created July 29, 2013 16:49
Disable all Hudson jobs
for(item in Hudson.instance.items) {
item.disable()
}
@whittlec
whittlec / gist:6112643
Last active April 25, 2024 20:56
Install plugins to Jenkins via script console
for (plugin in ["ant",
"artifactdeployer",
"build-failure-analyzer",
"build-name-setter",
"build-pipeline-plugin",
"build-timeout",
"claim",
"clone-workspace-scm",
"cobertura",
"collapsing-console-sections",
@whittlec
whittlec / gist:6112778
Created July 30, 2013 13:13
Apply permissions to users in Jenkins using matrix authorization strategy
strategy = Hudson.instance.authorizationStrategy;
if (strategy instanceof hudson.security.GlobalMatrixAuthorizationStrategy) {
for (user in ["bob", "mike"]) {
for (perm in ["hudson.model.Hudson.Read",
"hudson.model.Item.Read",
"hudson.model.Item.Build",
"hudson.model.Item.Workspace",
"hudson.model.Run.Delete",
"hudson.model.Run.Update",