Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39147

Add API to programmatically configure global settings for email-ext plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Show
          seadub Chris Williams added a comment - PR: https://github.com/jenkinsci/email-ext-plugin/pull/144
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Williams
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
          http://jenkins-ci.org/commit/email-ext-plugin/fb028e686b492a1fe720304cc670312bad830e6b
          Log:
          JENKINS-39147 Add API to programmatically configure global settings for email-ext plugin (#144)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Williams Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java http://jenkins-ci.org/commit/email-ext-plugin/fb028e686b492a1fe720304cc670312bad830e6b Log: JENKINS-39147 Add API to programmatically configure global settings for email-ext plugin (#144)
          Hide
          davidvanlaatum David van Laatum added a comment -

          merged

          Show
          davidvanlaatum David van Laatum added a comment - merged
          Hide
          davidvanlaatum David van Laatum added a comment -

          released

          Show
          davidvanlaatum David van Laatum added a comment - released

            People

            • Assignee:
              davidvanlaatum David van Laatum
              Reporter:
              seadub Chris Williams
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: