-
Bug
-
Resolution: Fixed
-
Minor
-
None
activeChoice supports placing scripts in the sandbox, which removes the requirement to have a admin approve the script.
It would be great if job-dsl could support setting the sandbox.
Currently its getting set to the default value, false.
- is duplicated by
-
JENKINS-42710 Update Active Choices DSL to support new secureScript tag (script-security-plugin)
-
- Closed
-
[JENKINS-41308] support Use Groovy Sandbox scripts in activeChoiceParams
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Attachment | New: screenshot-1.png [ 35686 ] |
Attachment | New: screenshot-2.png [ 35692 ] |
Did anyone ever get this to work with the `configure` block?
I lost a day of my life trying to modify the job xml in a `configure` block to enable the sandbox. Finally I got it so far:
It seems to work (i.e. XML looks ok) on https://job-dsl.herokuapp.com/, but when used in Jenkins it still does not work. The generated config.xml ends up with both <script> and <secureScript> tags side-by-side, i.e. the removal of the script element via {{ parent.remove(s.script) }} does not work when this JobDSL runs in Jenkins.
I had tried a variation with {{ replaceNode }} but this would not work in https://job-dsl.herokuapp.com ("java.lang.UnsupportedOperationException: Replacing the root node is not supported"). It did not throw this exception when run in Jenkins, but also not make any difference – still both elements there and the script needs approval.
Help?!