It's all about the answers!

Ask a question

Build email notification questions


Joef Huang (46114) | asked May 23 '11, 1:02 a.m.
Hello,

We are on RTC 2.0.0.2, and we understand that we have to use our own Ant task for email notification after a build completes. (Because build email notification is in 3.0M5 onwards)

But we have a couple of questions:

1, how to query build status/events in Ant script?
2, how to find the build status URL to be included in our email notification?

Thanks.

3 answers



permanent link
Brent Ulbricht (2.5k11) | answered May 23 '11, 3:21 p.m.
JAZZ DEVELOPER
Hello,

We are on RTC 2.0.0.2, and we understand that we have to use our own Ant task for email notification after a build completes. (Because build email notification is in 3.0M5 onwards)

But we have a couple of questions:

1, how to query build status/events in Ant script?
2, how to find the build status URL to be included in our email notification?

Thanks.


Hi,

This might be something to try depending on how you've set up your build. There is an Ant task named waitForTeamBuild. You could have the 'statesToWaitFor' attribute set to 'COMPLETED' or whichever state you're interested in and then send an email.

The link to the result could be derived with the 'repositoryAddress' and 'buildResultUUID' Ant properties available in the build file. The end build result link would look something like:

${repositoryAddress}/resource/itemOid/com.ibm.team.build.BuildResult/${buildResultUUID}

Brent Ulbricht
Developer/Lead - RTC Build

permanent link
Joef Huang (46114) | answered May 23 '11, 3:36 p.m.
Hello,

We are on RTC 2.0.0.2, and we understand that we have to use our own Ant task for email notification after a build completes. (Because build email notification is in 3.0M5 onwards)

But we have a couple of questions:

1, how to query build status/events in Ant script?
2, how to find the build status URL to be included in our email notification?

Thanks.


Hi,

This might be something to try depending on how you've set up your build. There is an Ant task named waitForTeamBuild. You could have the 'statesToWaitFor' attribute set to 'COMPLETED' or whichever state you're interested in and then send an email.

The link to the result could be derived with the 'repositoryAddress' and 'buildResultUUID' Ant properties available in the build file. The end build result link would look something like:

${repositoryAddress}/resource/itemOid/com.ibm.team.build.BuildResult/${buildResultUUID}

Brent Ulbricht
Developer/Lead - RTC Build

Thanks for the answers.

So how to call the "waitForTeamBuild" task?

If we call the "waitForTeamBuild" task as the last step in our Ant script? Won't that make the "waitForTeamBuild" task a part of the build itself?

Thanks.

permanent link
Brent Ulbricht (2.5k11) | answered May 24 '11, 9:29 a.m.
JAZZ DEVELOPER
Hello,

We are on RTC 2.0.0.2, and we understand that we have to use our own Ant task for email notification after a build completes. (Because build email notification is in 3.0M5 onwards)

But we have a couple of questions:

1, how to query build status/events in Ant script?
2, how to find the build status URL to be included in our email notification?

Thanks.


Hi,

This might be something to try depending on how you've set up your build. There is an Ant task named waitForTeamBuild. You could have the 'statesToWaitFor' attribute set to 'COMPLETED' or whichever state you're interested in and then send an email.

The link to the result could be derived with the 'repositoryAddress' and 'buildResultUUID' Ant properties available in the build file. The end build result link would look something like:

${repositoryAddress}/resource/itemOid/com.ibm.team.build.BuildResult/${buildResultUUID}

Brent Ulbricht
Developer/Lead - RTC Build

Thanks for the answers.

So how to call the "waitForTeamBuild" task?

If we call the "waitForTeamBuild" task as the last step in our Ant script? Won't that make the "waitForTeamBuild" task a part of the build itself?

Thanks.

Hi,

The use of waitForTeamBuild is more helpful in an Ant build file in which the build was started using the startTeamBuild Ant task. In the code sample below, the resultUUIDProperty attribute accepts a property name that will hold the value of the build result UUID. It is this property that is used as input for the waitForTeamBuild Ant task.

<startTeamBuild repositoryAddress="${repositoryAddress}"

userId="${userId}"
password="${password}"
requestUUID="${requestUUID}"
resultUUIDProperty="buildResultUUID"
label="test build"
autoComplete="false"
verbose="true" />


This pattern may not fit with what you've already developed though. These use cases fit more where the build is controlled by the build file and Ant tasks rather than using options defined in the build definition and executed automatically by the JBE.

Brent Ulbricht
Developer/Lead - RTC Build

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.