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

Detailed cause information in XML API

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None

    Description

      The XML API only gives a text blob for the upstream cause:
      <action><cause><shortDescription>Started by upstream project "blah" build number 62</shortDescription></cause></action>

      It would be nice to have structured access to the data.

      Attachments

        Activity

          mdonohue mdonohue added a comment - - edited

          My original comment quoted below makes less sense, now that the problem has been refined

          You can query the XML api to figure this out.
          http://n4.nabble.com/How-can-I-tell-what-triggered-a-build-td383536.html

          The upstream information is more rich than can easily be expressed in an environment variable. There's the job name and number, as well as parameters. Also, there can be multiple upstream jobs.

          mdonohue mdonohue added a comment - - edited My original comment quoted below makes less sense, now that the problem has been refined You can query the XML api to figure this out. http://n4.nabble.com/How-can-I-tell-what-triggered-a-build-td383536.html The upstream information is more rich than can easily be expressed in an environment variable. There's the job name and number, as well as parameters. Also, there can be multiple upstream jobs.
          samodelkin samodelkin added a comment -

          Can you add elements for upstream job name and build number, please?
          Currently I have to parse them out from cause/shortDescription. This is fragile (format can change) and is not convenient (especially in shell scripts).

          samodelkin samodelkin added a comment - Can you add elements for upstream job name and build number, please? Currently I have to parse them out from cause/shortDescription. This is fragile (format can change) and is not convenient (especially in shell scripts).
          samodelkin samodelkin added a comment -

          And still it is not possible to use API to set downstream build parameters, e.g. to set TAG parameter and use it in SVN checkout step.

          samodelkin samodelkin added a comment - And still it is not possible to use API to set downstream build parameters, e.g. to set TAG parameter and use it in SVN checkout step.
          mdonohue mdonohue added a comment -

          I suggest taking your problem description to the users mailing list to see what others have done.

          mdonohue mdonohue added a comment - I suggest taking your problem description to the users mailing list to see what others have done.
          mdonohue mdonohue added a comment -

          I see. The cause XML data doesn't have anything beside a short description

          mdonohue mdonohue added a comment - I see. The cause XML data doesn't have anything beside a short description

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Cause.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=24655
          Log:
          [FIXED JENKINS-5074] expose upstream cause details via remote API

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Cause.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=24655 Log: [FIXED JENKINS-5074] expose upstream cause details via remote API
          mdonohue mdonohue added a comment -

          Fast!

          mdonohue mdonohue added a comment - Fast!

          People

            mindless Alan Harder
            samodelkin samodelkin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: