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

Include promotion status in the JSON/XML for a build

      When using external tools to display build results it would be very helpful if we could query the promotion status of a build. This could just be the name of the promotion and the URL of the icon.

          [JENKINS-9259] Include promotion status in the JSON/XML for a build

          Actually you can do this now:

          http://hostname:8080/job/jobname/promotion/latest/internal_release/api/xml

          As long as you know the job and promotion names, you are good to go.

          Stig Kleppe-Jørgensen added a comment - Actually you can do this now: http://hostname:8080/job/jobname/promotion/latest/internal_release/api/xml As long as you know the job and promotion names, you are good to go.

          Jim Searle added a comment - - edited

          Deleted my comment...

          Jim Searle added a comment - - edited Deleted my comment...

          Jim Searle added a comment -

          That does work to get the promotion status, how do you get the config? For a job you can get:
          http://hostname/job/jobName/config.xml
          so I thought a promotion might be:
          http://hostname/job/jobName/promotion/promotionName/config.xml
          but that doesn't work.

          Jim Searle added a comment - That does work to get the promotion status, how do you get the config? For a job you can get: http://hostname/job/jobName/config.xml so I thought a promotion might be: http://hostname/job/jobName/promotion/promotionName/config.xml but that doesn't work.

          Hua Zhang added a comment - - edited

          One of my projects depends heavily on the jsonp interface (pure xhtml/javascript), using jenkins as backend engine.

          I only discovered some promotion information accessible through json api: the latest promotion build number (not the build number of the job being promoted) from permalinks:
          job/<jobname>/promotion/latest/<PromotionName>/api/json
          and eventually information of every promoted build:
          job/<jobname>/<JobBuildNumber>/promotion/<PromotionName>/promotionBuild/<PromotionBuildNumber>/api/json

          But the response does not contain any information related to build number of the origin job being promoted, so I basically cannot tell which build has been promoted by which promotion build, which is exactly the information I want to get.

          It would be nice if the following information could be exposed through remote access api:
          a) promotion status for each build, and/or
          b) a summary/history of all promotion builds with reference to the being promoted build number.

          Hua Zhang added a comment - - edited One of my projects depends heavily on the jsonp interface (pure xhtml/javascript), using jenkins as backend engine. I only discovered some promotion information accessible through json api: the latest promotion build number (not the build number of the job being promoted) from permalinks: job/<jobname>/promotion/latest/<PromotionName>/api/json and eventually information of every promoted build: job/<jobname>/<JobBuildNumber>/promotion/<PromotionName>/promotionBuild/<PromotionBuildNumber>/api/json But the response does not contain any information related to build number of the origin job being promoted, so I basically cannot tell which build has been promoted by which promotion build, which is exactly the information I want to get. It would be nice if the following information could be exposed through remote access api: a) promotion status for each build, and/or b) a summary/history of all promotion builds with reference to the being promoted build number.

          Jesse Glick added a comment -

          Was fixed in 2.12 but I guess the JIRA link daemon was down.

          Jesse Glick added a comment - Was fixed in 2.12 but I guess the JIRA link daemon was down.

            Unassigned Unassigned
            seanhoughton seanhoughton
            Votes:
            16 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: