How to query all build engines and get the build definitions associated to it in Java API?
I want to analyze the load on each build engines and rearrange some build definitions to some other build engines.
To do this which I want to get all available Build engines in a given PA and then get all build definitions associated to it.
How can i do this with Plain Java API?
we have 50+ Build engines and doing this manually is tough and also want to do the same in future too.
2 answers
For the Build APIs see: https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples
There are more examples to look at.
Also see https://rsjazz.wordpress.com/interesting-links/
Comments
Thanks Ralph for the pointers.
I also found https://jazz.net/forum/questions/88881/how-to-get-the-iteambuildservice and this is mostly what I need.
Now that I have the build engines, I am able to get buildEngine.getSupportedBuildDefinitions() just that I am unable o get the ID of the build definition returned. I am exploring that.
I found https://jazz.net/forum/questions/88881/how-to-get-the-iteambuildservice and this is mostly what I need.
With the piece of code in the above link, the following code will give all the build definitions from the Engine.
List<IBuildDefinitionHandle> lstBDefs = buildEngine.getSupportedBuildDefinitions();
for (IBuildDefinitionHandle lBDef : lstBDefs)
{
IBuildDefinition bd = (IBuildDefinition)auditableClient.fetchCurrentAuditable(lBDef, ItemProfile.createFullProfile(IBuildDefinition.ITEM_TYPE), null);
System.out.println(buildEngine.getId() + ";" + buildEngine.isActive() + ";" + bd.getId());
}
Thanks @Ralph and @sdetweil