I second this. It would be really nice to see the actual build number created in the response somewhere when using the api build and buildWithParameters calls. We can try to figure it out based on the nextBuildNumber, plus parsing through the queue/api/xml output, but it is not guaranteed.
- is duplicated by
-
JENKINS-4538 Returning build number when performing a remoteAPI build action
-
- Resolved
-
-
JENKINS-5189 When you trigger a task there is no page for it until the task starts to build
-
- Resolved
-
-
JENKINS-16263 Return the number of the build that was triggered using REST API.
-
- Resolved
-
-
JENKINS-50361 Return buildId when a job been triggered.
-
- Closed
-
- is related to
-
JENKINS-16827 console display wrong build number when triggering a new build
-
- Resolved
-
-
JENKINS-29222 Plugin detects the wrong build as triggered occasionally
-
- Open
-
-
JENKINS-26228 Allow for minimum time to live on item in queue, to ensure api consumers can connect a queue id to a job id
-
- Open
-
I'm also looking forward to get this feature implemented. I'm developing a ruby API client for Jenkins and many of my users have requested for this feature. Checking the nextBuildNumber and build queue may not give the correct build number. The response from Jenkins for build or buildWithParameters gives the response code of 302. It would be nice to get a JSON or XML response like
{
"buildNumber" : 11
}
this would be great.
https://github.com/arangamani/jenkins_api_client