Search code examples
linuxjenkins-pipelinecontainers

In-script approval screen, keeps showing signatures for approval although it was already approved


I have jenkins container which runs pipeline, and 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

Although I went to in-scriptApproval screen, and approved it, on the next run it shows them again. The same job works perfectly on other VM Jenkins.


Solution

  • The issue was with the wrong UID and GID of the user. after I've changed it from jenkins to 1000 1000 recursively, issue solved.