fabric8io/fabric8-pipeline-library

Missing script approvals configuration in Jenkins CI

seboudry opened this issue · 0 comments

Using fabric8-pipeline-library@master (commit 3f84b0b).
Missing script approvals configuration in Jenkins CI.

I've added approvals manually in "In-process Script Approval" page but is there a way to configure "Signatures already approved" list at fabric8 CI/CD creation ?

org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance
 		at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectStaticMethod(StaticWhitelist.java:192)
 		at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:142)
 		at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:180)
 		at org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:177)
 		at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:91)
 		at org.kohsuke.groovy.sandbox.impl.Checker$checkedCall$0.callStatic(Unknown Source)
 		at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)
 		at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)
 		at io.fabric8.Fabric8Commands.getCloudConfig(Fabric8Commands.groovy:711)
 		at io.fabric8.Fabric8Commands$getCloudConfig$0.call(Unknown Source)
 		at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
 		at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
 		at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151)
 		at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21)
 		at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:115)
 		at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
 		at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
 		at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16)
 		at mavenTemplate.call(/var/jenkins_home/jobs/spring-petclinic-fabric8/builds/19/libs/github.com/fabric8io/fabric8-pipeline-library/vars/mavenTemplate.groovy:14)
 		at mavenNode.call(/var/jenkins_home/jobs/spring-petclinic-fabric8/builds/19/libs/github.com/fabric8io/fabric8-pipeline-library/vars/mavenNode.groovy:8)
 		at WorkflowScript.run(WorkflowScript:30)
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method jenkins.model.Jenkins getCloud java.lang.String
 		at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectMethod(StaticWhitelist.java:178)
 		at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:119)
 		at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
 		at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
 		at org.kohsuke.groovy.sandbox.impl.Checker$checkedCall$0.callStatic(Unknown Source)
 		at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)
 		at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)
 		at io.fabric8.Fabric8Commands.getCloudConfig(Fabric8Commands.groovy:711)
 		at io.fabric8.Fabric8Commands$getCloudConfig$0.call(Unknown Source)
 		at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
 		at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
 		at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151)
 		at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21)
 		at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:115)
 		at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
 		at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
 		at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16)
 		at mavenTemplate.call(/var/jenkins_home/jobs/spring-petclinic-fabric8/builds/20/libs/github.com/fabric8io/fabric8-pipeline-library/vars/mavenTemplate.groovy:14)
 		at mavenNode.call(/var/jenkins_home/jobs/spring-petclinic-fabric8/builds/20/libs/github.com/fabric8io/fabric8-pipeline-library/vars/mavenNode.groovy:8)
 		at WorkflowScript.run(WorkflowScript:30)

One last:

approval: method io.fabric8.kubernetes.client.KubernetesClient services
callers:
at io.fabric8.Fabric8Commands.hasService(Fabric8Commands.groovy:637)
at io.fabric8.Fabric8Commands$hasService$1.call(Unknown Source)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:115)
at sonarQubeScanner.call(/var/jenkins_home/jobs/spring-petclinic-fabric8/builds/21/libs/github.com/fabric8io/fabric8-pipeline-library/vars/sonarQubeScanner.groovy:15)
at mavenCanaryRelease.call(/var/jenkins_home/jobs/spring-petclinic-fabric8/builds/21/libs/github.com/fabric8io/fabric8-pipeline-library/vars/mavenCanaryRelease.groovy:62)