Use the rest/api/latest/plan/{BuildKey} REST call and look for isBuilding.
This is very helpful. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wanted to give this a bump.
The QUEUE service only lists what is waiting to start building.
The RESULT service only lists what has been completed.
There seems to be a gap here. Is there any way to find out what is *currently* building?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used this REST API: /result/PROJECTKEY-PLANKEY/BUILDNUMBER
I check for the key ''lifeCycleState' in the json response.
If you see 'InProgress, its currently being built. i.e {'lifeCycleState':'InProgress'}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems there's an official solution for this: https://confluence.atlassian.com/bamkb/how-to-find-currently-running-jobs-900800506.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this might be what you are looking for:
wget -q -O agent.txt --http-user=%LOGIN% --http-password=%PASSWORD% "http://localhost:8085/rest/api/latest/agent?os_authType=basic"
The output is json and shows what the agents are currently doing. In particular there is an element 'busy' that will be true or false for each agent:
"busy":true
"busy":false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is a query parameter to get all the results, including the ones that are building:
includeAllStates=true
For example you could use it in:
/result/PLANKEY-latest.json?includeAllStates=true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry for the old bump on this -- looks like this only returns data on top level plans, is there anyway to check status on builds from lower branches?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use a plan branch key as path parameter
/result/PLAN-KEY1-latest.json?includeAllStates=true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One can use this, the result is either false or true
curl -ks --user <user>:<password> http://<bamboo_server>/rest/api/latest/plan/<project_key>-<plan_key>.json | jq .isBuilding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ugly one:
curl -u uid:pw http://bambooserver/admin/agent/configureAgents!default.action | grep Building | wc -l
not nice but it will give you the number of agents currently building,
or you could regexp it
good luck
Poul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would suggest to vote for this to happen:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bump
I'd like to inform you that in next few weeks I am going to release my package on npm which exposes API with all builds information like what is currently building, what is in the queue, how looks recent builds etc.
In the first release frontend side (I will make something like wallboard) and backend will be in the one package, but in future I think that I will split package into two standalone repos: backend - api, frontend. Cross your fingers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there still no API for this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you just want to see active builds visually you can use the Build Activity Screen in Bamboo 5. Its not pretty like the wallboard but it will show you everything running as well as agent usage:
/currentActivity.action
Build -> Build Activity
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm still conviced that there should be an endpoint for all running builds.
We are using Atlasboard to show stuff on a screen in our office, and we want (beneath others) to show all currently running builds.
Don't want to iterate over all Projects or Plans to get this information...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For branch builds just pass the branch build key which is normally just the parent key with the branch id appended.
So if your parent key is BUILD-FULL your branch key will be BUILD-FULL0.
To script this better just expand the branches in the plan REST CALL to get the key name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
currentActivity.action will tell you what is currently building but I don't know of any way to get it via rest or filter it for a specific plan. You might look in the api doc for currentActivity and see if you can find anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can try the QUEUE service, though that may only be plans waiting to be built. https://developer.atlassian.com/display/BAMBOODEV/Bamboo+REST+Resources#BambooRESTResources-BuildQueueService
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.