I have a pipeline which fails on script approval:
Scripts not permitted to use method org.jenkinsci.plugins.workflow.support.actions.EnvironmentAction getEnvironment. Administrators can decide whether to approve or reject this signature. [Pipeline] End of Pipeline [BFA] Scanning build for known causes... [BFA] No failure causes found [BFA] Done. 0s [JobCompletedListener] Build result is: FAILURE org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method org.jenkinsci.plugins.workflow.support.actions.EnvironmentAction getEnvironment
I went to in scriptApproval screen, approved the below:
signature: method org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper getRawBuild signature: method java.net.URL getProtocol signature: method java.lang.Throwable printStackTrace signature: method org.jenkinsci.plugins.workflow.support.actions.EnvironmentAction getEnvironment
but on the next run I'm getting the exact same error, and approval request in scriptApproval screen, comes up again. any idea what is the root cause of this behavior? is there a workaround for it?
Jenkins is running as a container, and the Security plugin version is 1.60. BTW, the same job works perfect on other Jenkins which is VM