It's all about the answers!

Ask a question

How do I call a build definition to start running from Ant script


Rachel Dichner (272610) | asked Jun 22 '14, 3:43 p.m.
 Hi
I would like to run a build definition and in its ant script to run another build definition in case of a successful run.
Is it possible?

Thanks
C
Rachel Dichner

2 answers



permanent link
Davyd Norris (20221014) | answered Jun 23 '14, 12:53 a.m.
Yes it is :-)

There are a number of custom Ant tasks that RTC has defined in its task library. You will need to make sure your build engine has the library available and then you can use the 'requestTeambuild' command to call another build definition. I've used this quite a few times and it works beautifully.

See the online help: https://jazz.net/help-dev/clm/topic/com.ibm.team.build.doc/topics/r_requestBuild.html

permanent link
Rachel Dichner (272610) | answered Jun 28 '14, 3:04 p.m.
 Hi
I used the command "requestTeambuild" and it works good only if it has the same build engine.
What if I want to call a new build definition with a different build engine?
I tried the startTeambuild command but I receive: "The build engine is about to process another build request and requires that all in progress builds previously by the build engine be abandoned" .
There are no other builds in process with this engine. It's in an idle state. 

Thanks
Rachel

Comments
Davyd Norris commented Jun 28 '14, 8:35 p.m.

The requestTeamBuild task should execute your build on the first available supported build engine listed in the build definition. That's what it does for me.

In fact, it won't work very well on the same build engine because that one will potentially be busy with the build you are using to call the new build.

One thing you will need to be careful about is your build directories, repository workspaces etc - make sure that none of them overlap and mess each other up.

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.