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

How to access my upstream git change logs to my downstream email-ext template

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • email-ext-plugin
    • None
    • Jenkins 2.32.1

      Hi Team,

      I am trying to pass my git change logs to my downstream job. But it is not accepting.

      if I use this environment in my upstream job email-ext default content it is working fine. ${CHANGES, showPaths=true, format="%a: %r %p \n-\"%m\"", pathFormat="\n\t %p"}

      But, I cant pass this variable using trigger build parameter. How to pass this environment to my downstream job.

      Regards,
      Raja

          [JENKINS-41032] How to access my upstream git change logs to my downstream email-ext template

          @Team Any update on this issue. Is there any ${CHANGES} variable available in Jenkins. If No, How can I send Git change logs as a parameter to my downstream job.

          Regards,
          Raja

          rajasekaran radhakrishnan added a comment - @Team Any update on this issue. Is there any ${CHANGES} variable available in Jenkins. If No, How can I send Git change logs as a parameter to my downstream job. Regards, Raja

          I can't think of any existing way to do that. upstream blaming stuff kinda does this but not sure if you can get the upstream changes

          David van Laatum added a comment - I can't think of any existing way to do that. upstream blaming stuff kinda does this but not sure if you can get the upstream changes

          rajasekaran radhakrishnan added a comment - - edited

          @David I did get.. If I Passed JobA_Changes=${CHANGES} it is passing "${CHANGES}" as a value. Is any plugin i need to install?

          But I can use ${CHANGES, showPaths=true, format="<div><b>%a</b>: %r %p </div><div style=\"padding-left:30px;\"> — “<em>%m</em>”</div>", pathFormat="</div><div style=\"padding-left:30px;\">%p"} in Email-ext plugin but I can assign this variable to any user defined variable in my Execute Shell.

          --Raja

          rajasekaran radhakrishnan added a comment - - edited @David I did get.. If I Passed JobA_Changes=${CHANGES} it is passing "${CHANGES}" as a value. Is any plugin i need to install? But I can use ${CHANGES, showPaths=true, format="<div><b>%a</b>: %r %p </div><div style=\"padding-left:30px;\"> — “<em>%m</em>”</div>", pathFormat="</div><div style=\"padding-left:30px;\">%p"} in Email-ext plugin but I can assign this variable to any user defined variable in my Execute Shell. --Raja

          {CHANGES}

          is actually a macro not a variable but technically a plugin could be made to set a variable to the results of a macro without too much difficulty.

          David van Laatum added a comment - {CHANGES} is actually a macro not a variable but technically a plugin could be made to set a variable to the results of a macro without too much difficulty.

          thanks for your input.. How to change macro to variable. Is there any plugin available or we need to write a script to change it. please give some blog reference to complete this action.

          Regards,
          Raja

          rajasekaran radhakrishnan added a comment - thanks for your input.. How to change macro to variable. Is there any plugin available or we need to write a script to change it. please give some blog reference to complete this action. Regards, Raja

          I know of no existing plugins to do it but that doesn't mean there isn't. Its might be possible with a groovy script as well.
          https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin

          David van Laatum added a comment - I know of no existing plugins to do it but that doesn't mean there isn't. Its might be possible with a groovy script as well. https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin

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

              Created:
              Updated:
              Resolved: