Complete the code to approve a script signature in Jenkins.
def approved = Jenkins.instance.getExtensionList('hudson.scm.SCM')[0].[1]('script-signature')
The getScriptApproval method accesses the script approval system in Jenkins.
Complete the code to check if a script is approved in Jenkins sandbox.
def isApproved = Jenkins.instance.getScriptApproval().[1]('signature')
The method isSignatureApproved checks if a specific script signature is approved.
Fix the error in the code to add a script signature for approval.
Jenkins.instance.getScriptApproval().[1]('new-signature')
The method addSignature adds a new script signature to the approval list.
Fill both blanks to create a script approval object and approve a signature.
def approval = Jenkins.instance.[1]() approval.[2]('signature-to-approve')
First, get the script approval object with getScriptApproval(), then approve the signature with approveSignature().
Fill all three blanks to reject a script signature and save the approval state.
def approval = Jenkins.instance.[1]() approval.[2]('signature-to-reject') approval.[3]()
Get the script approval object, reject the signature, then save the changes.