简体   繁体   中英

Jenkins Plug-in - Post-build Step - with many config options

I'm currently working on a Jenkins plug-in which is a post-build step (extends hudson.tasks.Builder). I make use of both global.jelly & config.jelly within the matching resources directory structure.

Up to now, for each field I've been using the following...

  • @DataBoundConstructor with a parameter for each field in my config
  • private final field for each field in my config
  • Custom getter for each field in my config

I have lots of things to configure, I feel there must be some easier way, to do with the JSON it uses in the background, which I can traverse myself much more cleanly?

How is the data actually persisted, as my current understanding is that it uses the getter's populate the value and how it actually stores the values I'm not sure?

Unfortunately that is the only way I know of to configure your builder. Jenkins persists all your configurations in your job's config.xml file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM