Skip to content

Instantly share code, notes, and snippets.

@tknerr
Created January 31, 2017 09:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tknerr/2beb9b7818cf717819f622609a4f916b to your computer and use it in GitHub Desktop.
Save tknerr/2beb9b7818cf717819f622609a4f916b to your computer and use it in GitHub Desktop.
pre-approve all pending script approvals, e.g. from a JobDSL script
import jenkins.*
import jenkins.model.*
Jenkins.instance.getExtensionList('org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval')[0].get().preapproveAll()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment