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

Unable to access upstream properties in downstream email-ext template

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • email-ext-plugin
    • None
    • jenkins 2.32.1

      Hello,

      I am trying to send consolidated mail for my CICD flow. There is three different jobs.
      Each jobs I am triggering using trigger parameter build and passed upstream properties to downstream job.
      I can able to get that properties in downstream level but I can not add those properties in email-ext template.

      for example I passed job A build URL to job B using Job_1_Build_Status_URL=${BUILD_URL}

      but I cant access ${Job_1_Build_Status_URL} in my groovy or jelly template. PFA template file and let me know do I need to do any configuration change in my downstream job.

      In first report I am using

      <tr>
      <td>Build URL</td>
      <td>
      <a href="${rooturl}${build.url}">${rooturl}${build.url}</a>
      </td>
      </tr>
      <tr>

      and Second report I am using

      <tr>
      <td>Build URL</td>
      <td>
      <a href="${Job_1_Build_Status_URL}">${Job_1_Build_Status_URL}</a>
      </td>
      </tr>
      <tr>

      I called my file in email-ext template using: ${SCRIPT, template="groovy1-html.template"} and ${JELLY_SCRIPT,template="myjelly"}

      Regards,
      Raja

          [JENKINS-40993] Unable to access upstream properties in downstream email-ext template

          Are you sure the information is being passed down? ie does a shell step see them or one of the build properties plugins show it.

          David van Laatum added a comment - Are you sure the information is being passed down? ie does a shell step see them or one of the build properties plugins show it.

          Is it mandatory to call upstream properties in downstream job as a string parameter to access that parameter. Or we can access those without defining string parameter in downstream job.?

          --Raja

          rajasekaran radhakrishnan added a comment - Is it mandatory to call upstream properties in downstream job as a string parameter to access that parameter. Or we can access those without defining string parameter in downstream job.? --Raja

          You must pass the value down or it wont be

          David van Laatum added a comment - You must pass the value down or it wont be

          Thank you.. I did this.

          rajasekaran radhakrishnan added a comment - Thank you.. I did this.

            davidvanlaatum David van Laatum
            rajraja rajasekaran radhakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: