Problems of using distributed build
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
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
Hi there,
The requestTeamBuild task allows specifying an overridePropertiesFile containing properties to add or override.
For example, your script could 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:
then in the second build's script:
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.
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.
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:
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}" .../>