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

buildWithParameters does not return queue location

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins 1.559
      CentOS 6.4
      Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
    • Similar Issues:

      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:

      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
      

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

      $ 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
      

      The expected response to this request is a 201 with the Location header containing the URL of a queue item (exactly what /build does).

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          Jenkins version?

          Show
          danielbeck Daniel Beck added a comment - Jenkins version?
          Hide
          joelittlejohn Joe Littlejohn added a comment -

          Ah sorry, the 'Affected Version/s' field wouldn't accept the version and I forgot to add it to the description. It's Jenkins 1.559.

          Show
          joelittlejohn Joe Littlejohn added a comment - Ah sorry, the 'Affected Version/s' field wouldn't accept the version and I forgot to add it to the description. It's Jenkins 1.559.
          Hide
          danielbeck Daniel Beck added a comment -

          Between Jenkins and almost a thousand plugins, Jira simply cannot handle the possible versions.

          Issue duplicates JENKINS-13546 which was fixed in 1.561.

          Show
          danielbeck Daniel Beck added a comment - Between Jenkins and almost a thousand plugins, Jira simply cannot handle the possible versions. Issue duplicates JENKINS-13546 which was fixed in 1.561.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            joelittlejohn Joe Littlejohn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: