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

          joelittlejohn Joe Littlejohn created issue -
          joelittlejohn Joe Littlejohn made changes -
          Field Original Value New Value
          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}
          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).
          joelittlejohn Joe Littlejohn made changes -
          Environment CentOS 6.4
          Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
          Jenkins 1.559
          CentOS 6.4
          Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
          danielbeck Daniel Beck made changes -
          Resolution Duplicate [ 3 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 155796 ] JNJira + In-Review [ 195246 ]

            People

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

              Dates

              Created:
              Updated:
              Resolved: