sendToIndividuals fails to mail culprits in declarative pipeline

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I have a declarative pipeline job. The Jenkinsfile has the following snippet:

       

      post {
        failure {
          step([$class: 'Mailer', recipients: 'ci@example.com', sendToIndividuals: true])
        }
      }

       

      When the build fails, the addresses in the recipients string successfully receive mail. However the culprits responsible for the broken commit do not receive an individual email. As I have set the sendToIndividuals, I expect that they would. I've been unable to find any logs that might suggest a misconfiguration.

       

      I have been able to workaround this issue with the mail-ext plugin by changing the above snippet to:

       

      post {
        failure {
          step([
            $class: 'Mailer',
            recipients: ['ci@example.com', emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])].join(' ')
          ])
        }
      }

       

      But I had hoped that this would work without introducing another plugin.

            Assignee:
            Unassigned
            Reporter:
            Jon Dufresne
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: