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

currentBuild.changeSets always null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver 2.140
    • Similar Issues:

      Description

      I was wondering if someone can help me.

      I am using the extended-email plugin together with jelly.

      When running the plugin (linked to a jelly script) .

       

      <!-- CHANGE SET -->
      <j:set var="changeSets" value="${scurrentBuild.changeSets}" />
      <j:if test="${changeSets!=null}">
      <j:set var="hadChanges" value="false" />
      <TABLE width="100%">
      <TR>
      <TD class="bg1" colspan="2"><B>CHANGES</B></TD>
      </TR>
      <j:forEach var="cs" items="${changeSets}" varStatus="loop">
      <j:set var="hadChanges" value="true" />
      <j:set var="aUser" value="${cs.hudsonUser}"/>
      <TR>
      <TD colspan="2" class="bg2">  Revision <B>${cs.commitId?:cs.revision?:cs.changeNumber}</B> by
      <B>${aUser!=null?aUser.displayName:cs.author.displayName}: </B>
      <B>(${cs.msgAnnotated})</B>
      </TD>
      </TR>
      <j:forEach var="p" items="${cs.affectedFiles}">
      <TR>
      <TD width="10%">  ${p.editType.name}</TD>
      <TD>${p.path}</TD>
      </TR>
      </j:forEach>
      </j:forEach>
      <j:if test="${!hadChanges}">
      <TR><TD colspan="2">No Changes</TD></TR>
      </j:if>
      </TABLE>
      <BR/>
      </j:if>

       

      The currentBuild.changeSets is always null. I am wondering why this is null. I do the checkout before hand and I see my commits on the jenkins homepage.

       

      Any help would be great.

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          There is no currentBuild in the context of an email-ext template. You can use build.currentChangesets

          Show
          slide_o_mix Alex Earl added a comment - There is no currentBuild in the context of an email-ext template. You can use build.currentChangesets

            People

            Assignee:
            slide_o_mix Alex Earl
            Reporter:
            malikos Omar Malik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: