It's all about the answers!

Ask a question

Where is the Build result stored? / ANT Task for change?


Srinath TV (36105) | asked Jan 26 '10, 7:32 a.m.
Hi all,

After implementing https://jazz.net/wiki/bin/view/Main/SCM15MinutesDemo and generating HTML report for Unit Tests, I was wondering to mention list of Changes ( which shows up under Show Changes -> Change Explorer) in the Build notification email.

Please, guide/tell, where is this information stored exactly? If in an XML file, where is it? .. if in a Log file, where is it? I mean, I want to know location, where Build results/reports are stored with Changes information, such that after parsing the same. I can send that info through email ..

I was also wondering, can this be implemented using any of ANT TASKS?

Please help, will greatly appreciate ..
Thanks so much..
Regards,
Geny.

5 answers



permanent link
Nick Edgar (6.5k711) | answered Jan 26 '10, 9:06 a.m.
JAZZ DEVELOPER
This is not currently supported directly by the Ant tasks, but I think we should make this easier.

For now, you can do this using the SCM command line tool. See the email section at http://jazz.net/library/article/195/

See also enhancement requests:
59822: teamAccept ANT task to generate text file with change set descriptions
58818: Bill of materials

Regards,
Nick

permanent link
Srinath TV (36105) | answered Feb 03 '10, 10:49 a.m.
This is not currently supported directly by the Ant tasks, but I think we should make this easier.

For now, you can do this using the SCM command line tool. See the email section at http://jazz.net/library/article/195/

See also enhancement requests:
59822: teamAccept ANT task to generate text file with change set descriptions
58818: Bill of materials

Regards,
Nick


Hi Nick,

I find this tutorial very tough :(
What I tried to do was, in command like typed ( scm -u yes compare -r "https://repository_Address" -u "username" -P "password" snapshot "App build_20100203-1237" snapshot "App build_20100201-1701" ) and then using ">> (redirect to file)" and "copy" command, I appended the output by it to the report.html which was to be sent through email,on build complete. It was working fine.
But, thing is, that I need the snapshot id, DYNAMICALLY. Such that I get it for current and last build, to see changes between the same. On observation, I found that numerics at the end are "labels" under "build results", is there a way to EXTRACT that? Once, I can extract labels or snapshot ids , I think, rest will be easy. Please guide.

I want to implement it as simply, as possible. Please help? And only thing I want is to add the changes between current and last build in the report.html, which is emailed to team members. I feel like, I am close, yet far. Please help. Thanks so much !!

permanent link
Nick Edgar (6.5k711) | answered Feb 03 '10, 4:51 p.m.
JAZZ DEVELOPER
Yes, I realise this is not easy currently, unfortunately. We really need to fix this.

If using Jazz SCM configuration in the build definition, JBE publishes the snapshot id for the build as a property, team.scm.snapshotUUID, which you can use from the Ant script. Or, if you're using the teamAccept Ant task, you can specify a snapshotProperty to hold the snapshot UUID.

The problem is, you still need to be able to determine the snapshot for the previous build. Looking it up by label is not a good approach, since you'd still need to determine the label for the previous build (and label's aren't necessarily unique).

The approach I recommend is to use the scm tool's list snapshots command, giving the build workspace UUID.

e.g.
scm --show-uuid y --show-alias n list snapshots -r ${repositoryAddress} -u ${userId} -P ${password} ${team.scm.worskpaceUUID}

Then write a little program or shell script to pick up the snapshot that's prior to the one for the current build (given by the team.scm.snapshotUUID property).

permanent link
Srinath TV (36105) | answered Feb 06 '10, 9:16 a.m.
Yes, I realise this is not easy currently, unfortunately. We really need to fix this.

If using Jazz SCM configuration in the build definition, JBE publishes the snapshot id for the build as a property, team.scm.snapshotUUID, which you can use from the Ant script. Or, if you're using the teamAccept Ant task, you can specify a snapshotProperty to hold the snapshot UUID.

The problem is, you still need to be able to determine the snapshot for the previous build. Looking it up by label is not a good approach, since you'd still need to determine the label for the previous build (and label's aren't necessarily unique).

The approach I recommend is to use the scm tool's list snapshots command, giving the build workspace UUID.

e.g.
scm --show-uuid y --show-alias n list snapshots -r ${repositoryAddress} -u ${userId} -P ${password} ${team.scm.worskpaceUUID}

Then write a little program or shell script to pick up the snapshot that's prior to the one for the current build (given by the team.scm.snapshotUUID property).


Hi Nick,

You are amazing :)
With your guidance, I could implement this task very easily, writing a PERL script of like 5-6 lines, with set of batch commands, I was able to get it running smooth.
Is there a similar and simpler way to get email notification on failed builds thing? I know, that tutorial has a whole section on it, but looking for something simple, as you explained/helped here.
Under my current setup using Mail Ant tasks, it sends email whenever build is complete on change checked in. But when build fails, it does nothing. Any help here?

Thanks so much !
Regards,
Geny

permanent link
Nick Edgar (6.5k711) | answered Feb 08 '10, 11:39 a.m.
JAZZ DEVELOPER
Unfortunately, with the scripting approach to sending emails, you need to ensure that the script can run to the point of sending email even if it fails.

Is it possible for you to have a main script that invokes the various steps, tracking their success/failure, and then has a final step to do the emails? If not, can you break the script up into two parts: outer and inner, where outer invokes inner then does email?

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.