• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • email-ext-plugin, pipeline
    • None
    • Jenkins 2.106, email-ext 2.61, Pipeline 2.5

      I have a function that defines the emailex configuration like this:

      def sendNotification(buildChanged) {
          // Some extra logic removed for presentation purposes.
          emailext (
                  subject: "[CI] ${env.JOB_NAME} ${env.BUILD_NUMBER} still unstable",
                  body: "Build still unstable: ${env.BUILD_URL}",
                  recipientProviders: [[
                      $class: "DevelopersRecipientProvider",
                      $class: "RequesterRecipientProvider"
                  ]]
              )
      }

         then I do this for notifications:

                  post {
                      always {
                          junit "reports/**/test*.xml"
                      }
                      changed {
                          sendNotification buildChanged: true
                      }
                      failure {
                          sendNotification buildChanged: false
                      }
                      unstable {
                          sendNotification buildChanged: false
                      }
                  }

      Unfortunately what happens after a commit is this:

      An attempt to send an e-mail to empty list of recipients, ignored.

      The developer list is definitely not empty. So the expected result is not empty.

      Am I missing something? Also, somewhat related to this, is there a plan for a nicer syntax for the pipelines, especially for the declarative one? Configuring notifications right now, especially more complex ones, is tedious and error prone.

          [JENKINS-49583] Adding multiple recipientProviders

          Costin Caraivan created issue -
          Costin Caraivan made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Costin Caraivan made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            davidvanlaatum David van Laatum
            ccaraivan Costin Caraivan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: