-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins 2.32.1
All plugins up to date today 30.01.2017 eg. Pipeline 2.4
The following Pipeline Skript fails in the sandbox
node { stage("this triggers bug without script approval") { manager.createSummary("warning.gif").appendText('test') } stage("this triggers bug with script approval") { manager.createSummary("warning.gif").appendText("<h1>You have been warned!</h1>", false, false, false, "red") } }
With the following error.
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildSummaryAction appendText java.lang.String at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
Additional Notes
Now after writing the bug i see that when i copy+paste the documentation example it fails but i get a pending script approval.
I guess those methods should be available in the sandbox by default?
method org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder$BadgeManager createSummary java.lang.String method org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildSummaryAction appendText java.lang.String boolean boolean boolean java.lang.String