Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins command to get number of builds in queue

I am trying to get the number of builds in the Jenkins Build Queue.

May I know the Jenkins command to get the number of builds running in the queue ?

like image 414
Lokith Avatar asked Jul 10 '15 09:07

Lokith


People also ask

How many builds you store in your Jenkins?

The UI is limited to 30 builds.

How many build queue does default Jenkins installation has?

It uses 4 Build Executors and puts 1 build into the queue.

How can I see my Jenkins details?

From the CI/CD drop-down list, select Jenkins > Jobs. A dashboard show Jenkins job data. For details, see Jenkins > Jobs.

What is queue in Jenkins?

A queue is a temporary waiting line for jobs before execution. The jobs will be waiting in the queue until they are assigned to free executors by the master Jenkins node.


1 Answers

See Jenkins' Remote access API.

Access the API description with:

  http://<Your Jenkins>/api/

and the actual data with:

  http://<Your Jenkins>/api/xml

The Build queue has its own separate API:

  http://<Your Jenkins>/queue/api/

with its data:

  http://<Your Jenkins>/queue/api/xml
like image 70
Gerold Broser Avatar answered Sep 20 '22 13:09

Gerold Broser