It's all about the answers!

Ask a question

Problems of using distributed build


Ken Lin (2143) | asked Nov 11 '09, 4:46 a.m.
Hi..
I am trying to execute builds in distributed machines. I used ant tasks (requestTeamBuild and waitForTeamBuild). I have some problems as follows:
1. How could I pass properties from the first build to the second one?
2. I want to add the second build log file to the first build. Is there any way I can do?
3. I don't understand the attributes deletePropertiesFile and overridePropertiesFile of requestTeamBuild task. Is there any one could explain how to use it?

Thank in advance.

Best Regards

4 answers



permanent link
Nick Edgar (6.5k711) | answered Nov 17 '09, 2:44 p.m.
JAZZ DEVELOPER
I'm not sure I understand. Doesn't the child build determine the file name for the log? Can you give an example?

permanent link
Ken Lin (2143) | answered Nov 16 '09, 3:49 a.m.
Hi.
Thank you. It is workable.
I have one more question about how to publish child build log to parenet build result. How can I get child build log file name when I used "<logPublisher>" in child build?


Best Regards

permanent link
Nick Edgar (6.5k711) | answered Nov 12 '09, 4:10 p.m.
JAZZ DEVELOPER
Since nested builds are not currently linked to each other automatically, I suggest doing this in your script using the linkPublisher task.

For example, from the child build, using the extra property from the example above, create bidirectional links with something like:

<linkPublisher buildResultUUID="${parentBuildResultUUID}" label="child build" url="${repositoryAddress}/resource/itemOid/com.ibm.team.build.BuildResult/${buildResultUUID}" .../>
<linkPublisher buildResultUUID="${buildResultUUID}" label="parent build" url="${repositoryAddress}/resource/itemOid/com.ibm.team.build.BuildResult/${parentBuildResultUUID}" .../>

permanent link
Nick Edgar (6.5k711) | answered Nov 12 '09, 3:57 p.m.
JAZZ DEVELOPER
Hi there,

1. How could I pass properties from the first build to the second one?

The requestTeamBuild task allows specifying an overridePropertiesFile containing properties to add or override.

For example, your script could do:
<echo "propA=value1" file="overrides.properties"/>

<echo "propB=value2" file="overrides.properties" append="true"/>
<teamRequestBuild ... overridePropertiesFile="overrides.properties"/>


2. I want to add the second build log file to the first build. Is there any way I can do?

Yes (we do this in our own integration builds). Use the above mechanism to pass the first build's UUID to the second build, then use that in the logPublisher task.

For example, in the first build's script:
<echo "parentBuildResultUUID=${buildResultUUID}" file="overrides.properties"/>

<teamRequestBuild ... overridePropertiesFile="overrides.properties"/>

then in the second build's script:
<logPublisher buildResultUUID="${parentBuildResultUUID}" .../>


3. I don't understand the attributes deletePropertiesFile and overridePropertiesFile of requestTeamBuild task. Is there any one could explain how to use it?

Hopefully this is clearer now from the examples above. See also the help topic linked above. The file format in both cases is the regular Java properties file format, with name=value, one per line.

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.