problem with <propertyfilelabelincrementer> and Ants <buildnumber> task causing perfect storm of label hell

David Corley <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hey all,
At the moment, if a project uses propertyfilelabelincrementer and the build
fails, Cruisecontrol will use the label from the failed build when
attempting to build again.
This is a problem with ant projects that use the <buildnumber> task.
<buildnumber> works by reading a number in from a file, setting a property
with that value, and incrementing the number in the file.
So the following situation can occur:
1. Cruisecontrol reads its label (x) from the build number property file
2. It attempts to build an ant project
3. The ant project <buildnumber> task gets the build number (x) from the
same property file in step 1, and increments (x+1) the number in the file
after the value has been retrieved and set in Ant
4. The build fails sometime after step 3.
5. The number has been incremented in the file (x+1), and Cruisecontrol
SHOULD read the updated value, but it appears if a build fails,
Cruisecontrol re-uses the label (x) from the failed build in the fix
attempt. This results in Cruisecontrol labels and Ant build numbers being
out of sync.

If we could set an additional attribute on <propertyfilelabelincrementer>
that forces Cruisecontrol to re-read the label after a failed build, that
would fix the problem.
The attribute could be called something like <alwaysUse> with type boolean.

<labelincrementer> "prebuildincrementer" attribute seems to allow something
similar.
If someone can tell me what I can do to force Cruisecontrol to NOT use the
failed builds label with <propertyfileincrementer>, that would be awesome.
I don't mind contributing code, but I don't know how to tell CC not to use
the label from the failed build. Help please?


Regards,
Dave



-- 
"To be or not to be. That's not really a question." - Jean-Luc Godard

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com

_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.