Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



2 answers

Permanent link

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/

1 vote

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.


Permanent link

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

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 76
× 35

Question asked: Aug 09 '17, 5:26 a.m.

Question was seen: 3,781 times

Last updated: Aug 22 '17, 4:49 a.m.

Confirmation Cancel Confirm