Change By: Joe Littlejohn (29/May/14 4:47 PM)
Description: When creating builds using /build, the result is a 201 response where the Location header points to the queue item that represents the new build. Example:

{code}
curl -X POST -v "http://jenkins.mycompany.com/job/test-job/build"
* Adding handle: conn: 0xf28b90
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xf28b90) send_pipe: 1, recv_pipe: 0
* About to connect() to jenkins.mycompany.com port 80 (#0)
*   Trying 10.10.10.10...
* Connected to jenkins.mycompany.com (10.10.10.10) port 80 (#0)
> POST /job/test-job/build HTTP/1.1
> User-Agent: curl/7.32.0
> Host: jenkins.mycompany.com
> Accept: */*

< HTTP/1.1 201 Created
< Date: Thu, 29 May 2014 16:38:29 GMT
* Server Jetty(8.y.z-SNAPSHOT) is not blacklisted
< Server: Jetty(8.y.z-SNAPSHOT)
< Location: http://jenkins.mycompany.com/queue/item/3901/
< Content-Length: 0
< Connection: close
< Content-Type: text/plain; charset=UTF-8

* Closing connection 0
{code}

For parameterized builds we must use /buildWithParameters instead, however the response from /buildWithParameters does not contain the queue location:

{code}
$ curl -X POST -v "http://jenkins.mycompany.com/job/parameterized-test-job/buildWithParameters"
* Adding handle: conn: 0xa63c30
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xa63c30) send_pipe: 1, recv_pipe: 0
* About to connect() to jenkins.mycompany.com port 80 (#0)
*   Trying 10.10.10.10...
* Connected to jenkins.mycompany.com (10.10.10.10) port 80 (#0)
> POST /job/parameterized-test-job/buildWithParameters HTTP/1.1
> User-Agent: curl/7.32.0
> Host: jenkins.mycompany.com
> Accept: */*

< HTTP/1.1 302 Found
< Date: Thu, 29 May 2014 16:41:09 GMT
* Server Jetty(8.y.z-SNAPSHOT) is not blacklisted
< Server: Jetty(8.y.z-SNAPSHOT)
< Location: http://jenkins.mycompany.com/job/parameterized-test-job/
< Content-Length: 0
< Connection: close
< Content-Type: text/plain; charset=UTF-8

* Closing connection 0
{code}


The expected response to this request is a 201 with the Location header containing the URL of a queue item (exactly what /build does).
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to