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

DevelopersRecipentProvider does not return value

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not A Defect
    • Icon: Major Major
    • email-ext-plugin
    • None
    •  Jenkins 2.32, Email-ext Plugin version 2.52, Git Client plugin 2.1.0, Git plugin 3.0.1

      email-ext-plugin
      This pipeline attempts to send some notifications when a build starts:
      https://github.com/bitwiseman/hermann/tree/issue/developers-recipient-provider

      The pipeline step looks like this:

      emailext (
            subject: "STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
            body: """<p>STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
              <p>Check console output at &QUOT;<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>&QUOT;</p>""",
            recipientProviders: [[$class: 'DevelopersRecipientProvider']]
          )
      

      This fails to send email. But it appears both of the following work:

      emailext (
            subject: "STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
            body: """<p>STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
              <p>Check console output at &QUOT;<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>&QUOT;</p>""",
            recipientProviders: [[$class: 'RequesterRecipientProvider']]
          )
      
      emailext (
            to: 'bitwiseman@bitwiseman.com', 
            subject: "STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
            body: """<p>STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
              <p>Check console output at &QUOT;<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>&QUOT;</p>""",
            recipientProviders: [[$class: 'DevelopersRecipientProvider']]
        )
      

            davidvanlaatum David van Laatum
            bitwiseman Liam Newman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: