It's all about the answers!

Ask a question

Chaining up Builds


Thomassian Guillaume (411) | asked May 10 '10, 9:30 a.m.
How can I chain up actions in order to get successive builds, like we can have with TeamCity or Hudson ?

Here's the process i'd like to execute
1-Continuous build (i already have this build working)
2-on build success, copy sources on a remote filesystem
3-on copy success, call a remote batch by url invocation

Any help would be appreciated !

17 answers



permanent link
Nick Edgar (6.5k711) | answered May 17 '10, 11:51 a.m.
JAZZ DEVELOPER
>
Even without the timeout option, waiting build never exits !

That is expected. If you don't give a timeout, it waits forever (for the given state(s)).


>If you want it to stop waiting if the build is canceled or abandoned, you'll need to add those states, e.g. statesToWaitFor="COMPLETED, CANCELED, INCOMPLETE".

It doesn't change anything.

That was just a suggestion for getting it to stop waiting on the other end states, I didn't think it would solve the problem.


I forgot to tell you that the builds run on separate engines.

That's good, since if the main build is waiting, the other build needs to get picked up by some other engine.

Can you clarify, though: does the actual synchronizer build actually finish? That is, is the problem that the nested build actually hangs, or that waitForTeamBuild is not seeing it finish properly?

permanent link
Thomassian Guillaume (411) | answered May 17 '10, 11:15 a.m.
>How long does the 'Synchroniser_j2ee_Integration_2' build take to run? Could it be that the 240 seconds limit is just too short? That is, is the 'IN_PROGRESS' state it's reporting after 240 seconds accurate?

Even without the timeout option, waiting build never exits !

>If you want it to stop waiting if the build is canceled or abandoned, you'll need to add those states, e.g. statesToWaitFor="COMPLETED, CANCELED, INCOMPLETE".

It doesn't change anything.

I forgot to tell you that the builds run on separate engines.

permanent link
Nick Edgar (6.5k711) | answered May 17 '10, 11:00 a.m.
JAZZ DEVELOPER
Hi Guillaume,

The overall approach looks good to me.

How long does the 'Synchroniser_j2ee_Integration_2' build take to run? Could it be that the 240 seconds limit is just too short? That is, is the 'IN_PROGRESS' state it's reporting after 240 seconds accurate?

If you want it to stop waiting if the build is canceled or abandoned, you'll need to add those states, e.g. statesToWaitFor="COMPLETED, CANCELED, INCOMPLETE".
You can check which state it ended up in using buildStateProperty="buildState" to set the buildState property to the resulting state. Likewise for build status, you can use buildStatusProperty="buildStatus".

> (sorry, i removed '<' chars cause they break the code in the post...)
Try checking 'Disable HTML in this post' when posting. Also note that the forum software has a bug whereby this setting gets lost when you use Preview.

a+,
Nick

permanent link
Thomassian Guillaume (411) | answered May 17 '10, 8:01 a.m.
Hi Guillaume, as mentioned in your other post, you can use the <requestTeamBuild> Ant task to kick off another build from the first build's script. There's not currently any support for configuring this in the UI.

The Ant task reference topic in the Help provides details on how to use this task.

a+,
Nick


Hi nedgar, it almost works !
It would be perfect if y could synchronise the different tasks. With <requestTeamBuild> all tasks are launched without waiting each other to complete.

I'll prototype something with <waitForTeamBuild>, is this the right way ?

Regards,

Guillaume

Hi again !

Here's an abstract of an ant task chaining up different builds.


requestTeamBuild repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
requestUUIDProperty="requestUUID"
buildDefinitionId="Synchroniser_j2ee_Integration_2"/>

echo message="Attente de la fin de la tache ID=${requestUUID}"/>

waitForTeamBuild repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
requestUUID="${requestUUID}"
statesToWaitFor="COMPLETED"
verbose="true"
timeout="240"
interval="1"/>


(sorry, i removed '<' chars cause they break the code in the post...)

unfortunately , i always get a timeout on the waitForTeamlBuild, even if the previous build is cancelled or complete.

In the logs, i get :

[echo] Attente de la fin de la tache ID=_Mjt3IWGaEd-0PatKv_pDNA
[waitForTeamBuild] Aucun proxy n'est utilis pour accder https://xxx.xxx.xxx.xxx:xxxx/jazz/
[waitForTeamBuild] Dbut de l'attente du passage de la gnration "_Mjt3IWGaEd-0PatKv_pDNA" l'tat COMPLETED.
[waitForTeamBuild] Dpassement du dlai d'attente maximal de 240 seconde(s) pour la gnration "_Mjt3IWGaEd-0PatKv_pDNA".
[waitForTeamBuild] La gnration "_Mjt3IWGaEd-0PatKv_pDNA" est passe l'tat IN_PROGRESS. Le dlai d'attente a t de 240 seconde(s).


So task is never detected as COMPLETE or CANCELED, and remains IN_PROGRESS...

Where's the problem ?

Regards,

Guillaume

permanent link
Thomassian Guillaume (411) | answered May 17 '10, 4:12 a.m.
Hi Guillaume, as mentioned in your other post, you can use the <requestTeamBuild> Ant task to kick off another build from the first build's script. There's not currently any support for configuring this in the UI.

The Ant task reference topic in the Help provides details on how to use this task.

a+,
Nick


Hi nedgar, it almost works !
It would be perfect if y could synchronise the different tasks. With <requestTeamBuild> all tasks are launched without waiting each other to complete.

I'll prototype something with <waitForTeamBuild>, is this the right way ?

Regards,

Guillaume

permanent link
Nick Edgar (6.5k711) | answered May 11 '10, 4:37 p.m.
JAZZ DEVELOPER
If you describe how you have this set up in Hudson or Team City, I might be able to provide a more concrete recommendation. Thanks.

permanent link
Nick Edgar (6.5k711) | answered May 11 '10, 4:36 p.m.
JAZZ DEVELOPER
Hi Guillaume, as mentioned in your other post, you can use the <requestTeamBuild> Ant task to kick off another build from the first build's script. There's not currently any support for configuring this in the UI.

The Ant task reference topic in the Help provides details on how to use this task.

a+,
Nick

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.