It's all about the answers!

Ask a question

API to retrieve scheduled builds - build time


Don Yang (7.7k21114139) | asked Aug 29 '17, 6:47 a.m.

There are hundreds of builds definitions in RTC which are scheduled builds and we want to use API to retrieve the scheduled build time to know what time those builds are scheduled every day.
There are two type of scheduled build time here: one is 'continuous interval in minutes' and another one is At a specific timestamp.
getBuildSchedule() method does not seem to return the scheduled build time so I am wondering if there is any API(s) we can use to get that info? (we are going to upgrade to 6.0.4 from 4.0.7 soon)

Appreciate if anyone may help in this request. Thanks a lot.


Comments
1
Ulf Arne Bister commented Aug 29 '17, 6:57 a.m.

Don,
I have fiddled some with Build / Build Definitions in Client API but not with the schedule in particular. So I will just write the generic approach I would use as a comment:
1. Go to RTC Eclipse Client
2. Open Build Schedule for a Build Definition
3. Use Shift+Alt+F1 to spy on what plugin classes are used
4. Alternatively use YARI
Once you have class names Java Search in a Workspace set up for RTC plugin development and you have a fairly good chance to find test classes utilizing that code and e.g. test the scheduler. This should give you a rough idea of the calls in question. Usually server side code looks somewhat similar but in this case might only be client side, since Eclipse is used for build scheduling.
Good luck hunting & I hope you get a more complete answer from sb else


Don Yang commented Sep 07 '17, 3:08 a.m.

Thanks Ulf for the comment.

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Aug 29 '17, 7:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Don,

In Java (Eclipse), if you set it up with the SDK you can relatively easily see what gets returned e.g. by com.ibm.team.build.common.model.IBuildDefinition.getBuildSchedule().

Follow https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ and setup Eclipse with the SDK and Plain java APIs and use the Eclipse editor, Search>Java and all the advanced stuff you have available.

getBuildSchedule() returns com.ibm.team.build.common.model.IBuildSchedule which is composed of com.ibm.team.build.common.model.IBuildScheduleEntry 's

That way you can access the schedule information from the build definition.
If you are interested in the more realistic times from the build results, go to https://rsjazz.wordpress.com/interesting-links/ search for Build Automation and follow the first and the other links to API examples.

Don Yang selected this answer as the correct answer

Comments
Don Yang commented Sep 07 '17, 3:09 a.m.

Thanks Ralph for the details.

Your answer


Register or 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.