Skip to content

Instantly share code, notes, and snippets.

@gotunandan
Forked from tknerr/preapprove.groovy
Created November 25, 2019 14:14
Show Gist options
  • Save gotunandan/5441272c7c18cb89d6af42e8f8074711 to your computer and use it in GitHub Desktop.
Save gotunandan/5441272c7c18cb89d6af42e8f8074711 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