Last active
March 20, 2018 01:30
-
-
Save scoheb/21d946bc5a7c19d77e10257460a4b95b to your computer and use it in GitHub Desktop.
Add signature to Script Approval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jenkinsci.plugins.scriptsecurity.scripts.* | |
ScriptApproval sa = ScriptApproval.get(); | |
//Add a signature to the list | |
signature = "staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods last java.lang.Iterable" | |
ScriptApproval.PendingSignature s = new ScriptApproval.PendingSignature(signature, false, ApprovalContext.create()) | |
sa.approveSignature(s.signature); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment