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

Return the number of the build that was triggered using REST API.

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core
    • None

      When using the REST API to programatically trigger a build, there is no way to atomically retrieve the number of the build which has been triggered (except by workarounds). This would enable REST clients to work with the triggered build, for example waiting for the build to finish and retrieve the results, when there is a possibility that multiple clients can trigger a build at the same time.

      Current status:
      POST request to the https://[...]/job/[job name]/build url will trigger a build and return a html page of the job overview.

      Proposed solution:
      Add a parameter to the request that will return a text response with the number of the triggered build instead of a html page.

          [JENKINS-16263] Return the number of the build that was triggered using REST API.

          Jakub Senko created issue -
          Jakub Senko made changes -
          Description Original: When using the REST API to programatically trigger a build, there is no way to atomically retrieve the number of the build which has been triggered (except by using plugins or workarounds). This would enable REST clients to work with the triggered build, for example waiting for the build to finish and retrieve the results, when there is a possibility that multiple clients can trigger the build at the same time.

          Current status:
          POST request to the https://[...]/job/[job name]/build url will trigger a build and return a html page of the job overview.

          Proposed solution:
          Add a parameter to the request that will return a text response with the number of the triggered build instead of a html page.
          New: When using the REST API to programatically trigger a build, there is no way to atomically retrieve the number of the build which has been triggered (except by using plugins or workarounds). This would enable REST clients to work with the triggered build, for example waiting for the build to finish and retrieve the results, when there is a possibility that multiple clients can trigger a build at the same time.

          Current status:
          POST request to the https://[...]/job/[job name]/build url will trigger a build and return a html page of the job overview.

          Proposed solution:
          Add a parameter to the request that will return a text response with the number of the triggered build instead of a html page.
          Jakub Senko made changes -
          Description Original: When using the REST API to programatically trigger a build, there is no way to atomically retrieve the number of the build which has been triggered (except by using plugins or workarounds). This would enable REST clients to work with the triggered build, for example waiting for the build to finish and retrieve the results, when there is a possibility that multiple clients can trigger a build at the same time.

          Current status:
          POST request to the https://[...]/job/[job name]/build url will trigger a build and return a html page of the job overview.

          Proposed solution:
          Add a parameter to the request that will return a text response with the number of the triggered build instead of a html page.
          New: When using the REST API to programatically trigger a build, there is no way to atomically retrieve the number of the build which has been triggered (except by workarounds). This would enable REST clients to work with the triggered build, for example waiting for the build to finish and retrieve the results, when there is a possibility that multiple clients can trigger a build at the same time.

          Current status:
          POST request to the https://[...]/job/[job name]/build url will trigger a build and return a html page of the job overview.

          Proposed solution:
          Add a parameter to the request that will return a text response with the number of the triggered build instead of a html page.
          sogabe made changes -
          Link New: This issue duplicates JENKINS-12827 [ JENKINS-12827 ]
          sogabe made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Jenkins IRC Bot made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: www [ 15484 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 147077 ] New: JNJira + In-Review [ 192224 ]

            Unassigned Unassigned
            jsenko Jakub Senko
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: