Jenkins plugin - link to global plugin settings in project plugin settings

I would like to write a simple hudson plugin. I am stuck on one. I would like to be able to use global settings from global.jelly as default values ​​for config.jelly.

Is it possible? How can i do this? One more thing - I will have a dynamic form in global.jelly (I will use the tag <f:repeatable>).

+3
source share
1 answer

When a user submits a global configuration, it is called in your handle configure(StaplerRequest req, JSONObject json). Usually you extract your parameter from the request and put it in the field of your descriptor, where it will be automatically saved.

getter , . <f:textbox default="${descriptor.getSetting()}/> config.jelly .

+2

All Articles