Status: Closed (View Workflow)
It'd be nice to have setters for all the properties, so that I could programmatically set up the plugin using groovy scripts. I use chef to configure our Jenkins master. I can write out overridden plugin config XML files to disk, but that can be a pain when hey contain values needing to be encrypted - plus I seem t need to restart Jenkins to get the values reflected, a simple reload config from disk doesn't cut it.
But using groovy to manipulate the plugins in code does work without a restart, and avoids needing to jump through hoops to encrypt the secret values before sticking them into the xml file - it's just that not all plugins expose an API to be able to configure them outside the web UI.
Currently, I see that we can now set SMTP host: https://github.com/jenkinsci/email-ext-plugin/pull/142#issuecomment-255027134
But ideally we'd be able to set things like: smtp username, smtp password, smtp port, whether to use ssl, charset, default content type, etc. For reference, the basic Mailer plugin does this: https://github.com/jenkinsci/mailer-plugin/blob/master/src/main/java/hudson/tasks/Mailer.java#L488
Code changed in jenkins
User: Christopher Williams
JENKINS-39147 Add API to programmatically configure global settings for email-ext plugin (#144)