Welcome to the Jazz Community Forum
requestTeamBuild + waitforTeam Build error

I'm attempting to start a Jazz build from another Jazz build, but I don't want the parent to complete until the child is complete. I'm starting the child like this:
<target name="request_build">
<requestTeamBuild repositoryAddress="https://192.168.115.102:9443/jazz/"
userId="<my_user_id>"
password="<my_pass>"
requestUUIDProperty="childBuildRequestUUID"
verbose="true"
buildDefinitionId="Test Release Build Child"/>
</target>
and I'm waiting on it with this:
<target name="wait_for_build">
<waitForTeamBuild repositoryAddress="https://192.168.115.102:9443/jazz/"
userId="<my_user_id>"
password="<my_pass>"
verbose="true"
requestUUID="dummy"/>
</target>
I'm expecting the property "childBuildRequestUUID" to be set to the UUID of the build request in the parent, but it's not. I have created the property and set it to dummy in the parent's build definition but as we can see, it's not being set by the request call. The child build is started successfully and its requestUUID set appropriately within its context.
From the log:
[waitForTeamBuild] Ant task attribute "requestUUID" contains illegal value "dummy".
What am I doing wrong?
Thanks,
Dave
2 answers

Comments

Hi Nick,


Hi Nick, I've just got back to this after some other distractions.

When you print childBuildRequestUUID using "${childBuildRequestUUID}" does it print as empty string or as "${childBuildRequestUUID}", i.e. no substitution done?

just to be clear, and to ensure I'm doing the right thing, here's the ant script:
<project name="ALPS" default="request_build">
<property file="/var/cache/build/20131126-0805/build.properties"/>
<target name="request_build">
<requestTeamBuild repositoryAddress="https://192.168.115.102:9443/jazz/"
userId="<my_user_id>"
password="<my_pass>"
requestUUIDProperty="childBuildRequestUUID"
verbose="true"
personalBuild="true"
buildDefinitionId="Test Release Build Child"/>
<echo>Ant childBuildRequestUUID: ${childBuildRequestUUID}</echo>
<echo>Ant repositoryAddress: ${repositoryAddress}</echo>
</target>
<taskdef name="requestTeamBuild"
classname="com.ibm.team.build.ant.task.RequestBuildTask" />
</project>
The output is:
Successfully requested build for build definition "Test Release Build Child".
[echo] Ant childBuildRequestUUID:
[echo] Ant repositoryAddress: https://192.168.115.102:9443/jazz/
BUILD SUCCESSFUL
Total time: 12 seconds
I also tried echoing the value of childBuildRequestUUID before the call to requestTeamBuild, and it printed the same as the echo after the call. The variable is not declared/initialised anywhere before that.
Am I correct in understanding that the script should result in the shell environment variable childBuildRequestUUID being created and the UUID of the build request being set to it?
Thanks,
Dave
Comments

I'm not entirely certain why the scrip above didn't work. At various points I have had to prevent variable expansion in the shell script I'm using to create the here document that is the ant script, as well as preserving the property value across the shell fork.

> [echo] Ant childBuildRequestUUID:

> ... the script should result in the shell environment variable childBuildRequestUUID being created and the UUID of the build request being set to it?