I recently watched Sam's
video guides on how to modify Jenkins settings via Groovy scripts.
I'm trying to modify the default shell programmatically and running into difficulties.
On a different Jenkins instance, I see that hudson.tasks.Shell.xml contains this config
<hudson.tasks.Shell_-DescriptorImpl>
</hudson.tasks.Shell_-DescriptorImpl>
How do I access that field using Groovy?
I found
hudson.tasks.Shell.DescriptorImpl.setShell(String shell) doc.
When I tried to access hudson.tasks via Hudson.instance.tasks.dump() I got this error
groovy.lang.MissingPropertyException: No such property: tasks for class: hudson.model.Hudson
Possible solutions: class
1. Jenkins.instance vs Hudson.instance? Which contains what and why?
2. How do I access the setShell() method?
Thanks for your help in advance