Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groovy script at end of doc job failed due to UnapprovedUsageException #166

Closed
tfoote opened this issue Jan 26, 2016 · 7 comments
Closed

Comments

@tfoote
Copy link
Member

tfoote commented Jan 26, 2016

Groovy script at end of doc job failed

http://build.ros.org/job/Idoc__ueye__ubuntu_trusty_amd64/configure

[ssh-agent] Stopped.
ERROR: Failed to evaluate groovy script.
org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use
        at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:428)
        at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:166)
        at org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.perform(GroovyPostbuildRecorder.java:362)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
        at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
        at hudson.model.Build$BuildExecution.post2(Build.java:185)
        at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
        at hudson.model.Run.execute(Run.java:1766)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:408)
Build step 'Groovy Postbuild' changed build result to FAILURE
Build step 'Groovy Postbuild' marked build as failure

There are many other instances:
http://build.ros.org/job/Idoc__catkin__ubuntu_trusty_amd64/10/
http://build.ros.org/job/Idoc__ueye__ubuntu_trusty_amd64/6/
http://build.ros.org/job/Idoc__nao_robot__ubuntu_trusty_amd64/7/
http://build.ros.org/job/Idev__rtmros_hironx__ubuntu_trusty_amd64/4/
http://build.ros.org/job/Idoc__barrett_hand__ubuntu_trusty_amd64/6/
http://build.ros.org/job/Idoc__nao_moveit_config__ubuntu_trusty_amd64/7/
http://build.ros.org/job/Jdoc__patrolling_sim__ubuntu_trusty_amd64/7/
http://build.ros.org/job/Jdoc__navigation_2d__ubuntu_trusty_amd64/1/

@tfoote
Copy link
Member Author

tfoote commented Jan 26, 2016

References:
https://wiki.jenkins-ci.org/display/JENKINS/Script+Security+Plugin
and
https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin

The groovy script required clicking approve here: http://build.ros.org/scriptApproval/

I don't know why this changed and needed approval:

script approval

@tfoote
Copy link
Member Author

tfoote commented Jan 26, 2016

I think we need to whitelist the methods we plan to use and then run the scripts in the sandbox.

@tfoote
Copy link
Member Author

tfoote commented Jan 26, 2016

I think we need to add the methods here: /var/lib/jenkins/secrets/whitelisted-callables.d

@tfoote tfoote added the ready label Jan 26, 2016
@dirk-thomas dirk-thomas removed the ready label Jan 29, 2016
@mikaelarguedas
Copy link
Contributor

Can this be closed ? I think that when we upgraded to groovy2 we had to approve every single method.
The deployment configuration changed related to these approval is already ticketed here

@tfoote
Copy link
Member Author

tfoote commented Apr 27, 2017

We should keep this open so we make sure to get an automated solution for deployment not just having fixed it manually for our current instance.

@dirk-thomas
Copy link
Member

We should keep this open so we make sure to get an automated solution for deployment not just having fixed it manually for our current instance.

Isn't that exactly what the ticket @mikaelarguedas created here is all about? We could keep this ticket for visibility but it is clearly a duplicate.

@tfoote
Copy link
Member Author

tfoote commented Apr 27, 2017

Sorry yes that fully covers this.

@tfoote tfoote closed this as completed Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants