It's all about the answers!

Ask a question

Retrieving accepted changes during build execution


Michele Pegoraro (1.8k12114102) | asked Oct 27 '09, 7:11 a.m.
Hi,
Is there a way to catch into an ant build file the pending changes accepted at the beginning of the build execution?

I'd like to get this information in order to perform a copy only of modified files.
Is this information stored in some property or can it be retrieved using a internal task or something similar?

Thanks,
Michele.

3 answers



permanent link
Nick Edgar (6.5k711) | answered Oct 31 '09, 9:37 a.m.
JAZZ DEVELOPER
Michele,

The teamAccept Ant task allows you to specify a changeSetFile which will contain the item ids for change sets that got accepted. The Jazz SCM support in JBE (used when you configure the build definition for Jazz SCM) does not currently expose this capability.

However, getting more details about the structure of the change sets would involve either writing Java code, or possibly using the SCM command line (see http://jazz.net/library/article/195/).

It would help to know what you're trying to do with this, at a higher level. I might be able to suggest other alternatives.

Regards,
Nick

permanent link
Michele Pegoraro (1.8k12114102) | answered Nov 02 '09, 4:48 a.m.
Hi Nick,
I was trying to catch the name of the files contained inside the change-sets which are accepted. Once I've these names I would like to perform a copy of these, and only these, files into a network device which I have mounted.

Currently I have resolved using an external java class, created using java API, which perform a search into the change-sets linked to a specific workitem which I have to supply to my script. It's a quite long circle to have these information and so I was searching for a faster way to get these informations.

permanent link
Evan Hughes (2.4k1318) | answered Nov 03 '09, 9:26 a.m.
JAZZ DEVELOPER
Hi Michele,

You should be able to use 'scm compare' to get a listing of all of the changed files. It's very similar to Recipe 3 in http://jazz.net/library/article/195/. In a nutshell:
1. Store the UUID of the build snapshot in a file.
2. At the start of each build, grab the UUID of the snapshot of the last build from the file.
3. Run 'scm compare' on the current snapshot and the previous snapshot.


To get a listing of modified files, run 'scm compare' with the current snapshot UUID and the previous snapshot UUID. To get a listing of modified files, use the '-I' flag. I believe that '-I f' will give you a listing of changed files. Adding other type flags to the '-I' parameter will modify the output.

e

Your answer


Register or to post your answer.