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 ?
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 ?
Try Jenkins API in Python.
See Jenkins' Remote access API.
Access the API description with:
and the actual data with:
The Build queue has its own separate API:
with its data:
Here is a shell script implementation of the mentioned Jenkins REST API
That's easy to do with Jenkins Script Console:
Also that's possible to execute groovy script remotely. For example, from command line:
Note: user with specified username should have access to Jenkins Script Console.