Reviewed: https://review.openstack.org/561836 Committed: https://git.openstack.org/cgit/openstack/python-jenkins/commit/?id=91ab3d90576b3394d18b5c3963bbde74cda4d60f Submitter: Zuul Branch: master
commit 91ab3d90576b3394d18b5c3963bbde74cda4d60f Author: Ken Dreyer <[email protected]> Date: Tue Apr 17 02:52:48 2018 -0600 build_job: return queue item identifier Since Jenkins version 1.519 (released 2013/06/17), build_job() would always return an empty string (the empty HTTP body from the POST request). Read the HTTP response's Location header and return the queue ID number. Clients can use this number to query server for the the upcoming job's status. Change-Id: I2a1ef3abb7e675e0ad37dd8eb4a377af22f27a03 Closes-Bug: #1724932 -- You received this bug notification because you are a member of Python Jenkins Developers, which is subscribed to Python Jenkins. https://bugs.launchpad.net/bugs/1724932 Title: build_job() always returns an empty string, no way to track resulting ID Status in Python Jenkins: Fix Released Bug description: Since Jenkins version 1.519 (released 2013/06/17), build_job() always returns an empty string (the empty HTTP body from the POST request). The Jenkins REST API currently returns an HTTP response with a "Location" header that includes a queue item number for the job. This queue item number is only valid for a few minutes until Jenkins removes it from memory, but in the meantime, while it's available, clients can poll it to find the eventual job ID / URL. Instead of returning the HTTP response body, we should parse this Location HTTP header and return the queue ID. This will require a new jenkins_urlopen() method, since the main jenkins_open() method only returns the body without regard for any headers. We can also implement a get_queue_item() method to discover a queued job's status, and possibly a job URL. To manage notifications about this bug go to: https://bugs.launchpad.net/python-jenkins/+bug/1724932/+subscriptions -- Mailing list: https://launchpad.net/~python-jenkins-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~python-jenkins-developers More help : https://help.launchpad.net/ListHelp

