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

Cannot find changelist number for arbitrary job (api/xml should list it)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I cannot figure out what changelist was used for an arbitrary build.

      We used the SVN plugin in the past, and for any arbitrary build, we can examine the "api/xml" url and it will tell us what revision was used to build that particular build.

      With the perforce plugin, if you examine the api/xml, the "changeSet" is null. The workaround is to parse the output of the job for the value of the changeSet that was used. This is not ideal, since if the text changes, then the parsing will not work.

      Steps to Reproduce:
      1. Submit a change to perforce.
      2. Run your build. You'll notice that the "changeSet" value in the "http://localhost:8080/jenkins/job/foo/1/api/xml" correctly has your changelist number.
      3. Run your build again without making a perforce submission. Examine "http://localhost:8080/jenkins/job/foo/2/api/xml". You don't know what changeSet number was used to build this job. The "changeSet" value is null. ("<changeSet/>")

      On a side note, if you examine the build.xml that is saved in the Jenkins job directory for that particular build, you'll see your changeSet number. It just has to be displayed via the api/xml.

      Thanks! If you need any specific info, or if you have a workaround, let me know!
      Oh, we're using perforce plugin version 1.3.17

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceTagAction.java
          http://jenkins-ci.org/commit/perforce-plugin/d04ccd57289423b0cd9f846775f1ed1bf1bf10a5
          Log:
          JENKINS-15603 export changenumber from perforcetagaction

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceTagAction.java http://jenkins-ci.org/commit/perforce-plugin/d04ccd57289423b0cd9f846775f1ed1bf1bf10a5 Log: JENKINS-15603 export changenumber from perforcetagaction
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceTagAction.java
          http://jenkins-ci.org/commit/perforce-plugin/a2524426e9055fafdbc12a26ed48233b9ecf3746
          Log:
          JENKINS-15603 attempting to fix non-working export for changenumber

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceTagAction.java http://jenkins-ci.org/commit/perforce-plugin/a2524426e9055fafdbc12a26ed48233b9ecf3746 Log: JENKINS-15603 attempting to fix non-working export for changenumber
          Hide
          rpetti Rob Petti added a comment -

          Sorry, I'm still working on this, just having a lot of issues trying to export this value... :/

          Show
          rpetti Rob Petti added a comment - Sorry, I'm still working on this, just having a lot of issues trying to export this value... :/

            People

            • Assignee:
              Unassigned
              Reporter:
              grayaii Alex Gray
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: