Excute requesting build with command line when using RTC
One answer
Hi,
I'd like to use RTC to build my project, I usually use client to excute requesting build on build definition.
Can I use command line instead of client to request build?
If yes could you tell me the command and how to use, thank you!
Hi,
There is an Ant task named requestTeamBuild that allows for requesting a build. The link below will take you to the documentation and then search for requestTeamBuild.
http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0/index.jsp?topic=/com.ibm.rational.clm.doc/helpindex_clm.html
Another option would be to code a Java program to request a build. The API calls look similar to the code below. You will need to download the RTC SDK to use this option.
ITeamBuildClient buildClient = (ITeamBuildClient) teamRepository.getClientLibrary(ITeamBuildClient.class);
IBuildDefinition buildDefinition = buildClient.getBuildDefinition(buildDefinitionId, monitor);
ITeamBuildRequestClient requestClient = (ITeamBuildRequestClient) teamRepository.getClientLibrary(ITeamBuildRequestClient.class);
IBuildRequest buildRequest = requestClient.requestBuild(buildDefinition, true, monitor);
Best regards,
Brent Ulbricht
Developer/Lead - RTC Build