Hello guys!

Our team has experience with Jenkins. But first time we get a task when we 
need to connect to database for getting list of values for select box, 
which should be build parameter.

We found https://plugins.jenkins.io/extensible-choice-parameter which has 
“System 
Groovy Choice parameter”.  So a hope was to connect by groovy to mysql and 
get a list with needed parameters with needed filtering. But we get
Failed to execute script

org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts 
not permitted to use staticMethod groovy.sql.Sql newInstance java.lang.String 
java.lang.String java.lang.String java.lang.String
        at 
org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectStaticMethod(StaticWhitelist.java:192)


This is more or less predictably because of security reason…

How should such task be done right?

I can see https://wiki.jenkins-ci.org/display/JENKINS/Database+Plugin and 
https://plugins.jenkins.io/database-mysql but I have not understood if they 
can help in this task…

Please advice.

Best regards,
Andrey

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5585e335-489b-49ed-9e21-d1470dab17e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to