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

The email-ext-plugin Pipeline integration is not very ergonomic

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      People working with Jenkins pipelines can have very varied backgrounds. They can not be assumed to be developers, they might barely know about Groovy or object oriented programming.

      To tame this complexity the Declarative Pipelines were introduced, which are somewhat simpler than the regular Scripted Pipelines.

      However some parts of the configuration are still quite hard to follow. One example is the email-ext-plugin configuration.

      I'm not entirely sure how this could be improved, but I believe a first step would be to get rid of these kinds of $class configuration entries:

      emailext body: 'A Test EMail', recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']], subject: 'Test', to: 'abc'
      

      Quoting Andrew Bayer:

      Syntax for the emailext step can be improved by adding @Symbol annotations to the various provider classes's Descriptor classes, fyi.
      

       

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: David van Laatum
            Path:
            src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/DevelopersRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/FailingTestSuspectsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/FirstFailingBuildSuspectsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/ListRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/RequesterRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java
            http://jenkins-ci.org/commit/email-ext-plugin/028f0addc09b69d462e1e400dd9d20ee47422a0b
            Log:
            JENKINS-49733 Add @Symbol annotations to Recipient Providers

            Compare: https://github.com/jenkinsci/email-ext-plugin/compare/73241db54ff4^...028f0addc09b

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: David van Laatum Path: src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/DevelopersRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/FailingTestSuspectsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/FirstFailingBuildSuspectsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/ListRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/RequesterRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java http://jenkins-ci.org/commit/email-ext-plugin/028f0addc09b69d462e1e400dd9d20ee47422a0b Log: JENKINS-49733 Add @Symbol annotations to Recipient Providers Compare: https://github.com/jenkinsci/email-ext-plugin/compare/73241db54ff4 ^...028f0addc09b
            Hide
            davidvanlaatum David van Laatum added a comment -

            emailext body: 'A Test EMail', recipientProviders: [culprits(), developers(), brokenTestsSuspects(), brokenBuildSuspects(), upstreamDevelopers(), requestor()], subject: 'A Test EMail', to: 'abc@example.com'

            will be in next release

            Show
            davidvanlaatum David van Laatum added a comment - emailext body: 'A Test EMail', recipientProviders: [culprits(), developers(), brokenTestsSuspects(), brokenBuildSuspects(), upstreamDevelopers(), requestor()] , subject: 'A Test EMail', to: 'abc@example.com' will be in next release
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: David van Laatum
            Path:
            src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/DevelopersRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/FailingTestSuspectsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/FirstFailingBuildSuspectsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/ListRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/RequesterRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java
            http://jenkins-ci.org/commit/email-ext-plugin/8bd0b50faf133eb363ded8802e4bb6ad137c8730
            Log:
            JENKINS-49733 Add @Symbol annotations to Recipient Providers

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: David van Laatum Path: src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/DevelopersRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/FailingTestSuspectsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/FirstFailingBuildSuspectsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/ListRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/RequesterRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java http://jenkins-ci.org/commit/email-ext-plugin/8bd0b50faf133eb363ded8802e4bb6ad137c8730 Log: JENKINS-49733 Add @Symbol annotations to Recipient Providers
            Hide
            ccaraivan Costin Caraivan added a comment - - edited

            Quick Draw McGraw! That was fast

            I'm not sure where to report this, I'm guessing you're not also working on the default Jenkins Mailer?

            Anyway, cool and thanks a lot

            Show
            ccaraivan Costin Caraivan added a comment - - edited Quick Draw McGraw ! That was fast I'm not sure where to report this, I'm guessing you're not also working on the default Jenkins Mailer? Anyway, cool and thanks a lot
            Hide
            davidvanlaatum David van Laatum added a comment -

            no the default mailer is not mine

            Show
            davidvanlaatum David van Laatum added a comment - no the default mailer is not mine
            Hide
            earshinov Evgeny Arshinov added a comment -

            Shouldn't the new syntax be documented on the documentation pages (with examples)?

            Show
            earshinov Evgeny Arshinov added a comment - Shouldn't the new syntax be documented on the documentation pages (with examples)? https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin https://jenkins.io/doc/pipeline/steps/email-ext/

              People

              • Assignee:
                davidvanlaatum David van Laatum
                Reporter:
                ccaraivan Costin Caraivan
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: