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

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

    XMLWordPrintable

Details

    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

          seadub Chris Williams added a comment - PR: https://github.com/jenkinsci/email-ext-plugin/pull/144

          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)

          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)

          merged

          davidvanlaatum David van Laatum added a comment - merged

          released

          davidvanlaatum David van Laatum added a comment - released

          People

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

            Dates

              Created:
              Updated:
              Resolved: