Re: using ${svnrevision} in shedule

"Antoine Levy-Lambert" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hello Daniel,
what you write should work if the <svn/> source control is used.
Is the svn executable on the path for your cruisecontrol ?
You might want to use a custom log4j.properties and run cruisecontrol with debug information.

I run cruisecontrol with a VM parameter 

-Dlog4j.configuration=file:log4j.properties 


here is my full log4j.properties (do not copy it as is, it contains some custom stuff).

log4j.logger.net.sourceforge.cruisecontrol=DEBUG,FILE
log4j.logger.cleartool=ALL,CLEARTOOL
log4j.logger.com.saic.ivykris=DEBUG,FILE
# A1 is to console
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[cc]%d{MMM-dd HH:mm:ss} %-14.14c{1}- %m%n

# FILE is file logger with rotation
log4j.appender.FILE=org.apache.log4j.RollingFileAppender
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d [%-9t] %-5p %-16c{1} %x- %m%n
log4j.appender.FILE.File=logs/cruisecontrol.log
log4j.appender.FILE.MaxFileSize=5000KB
log4j.appender.FILE.MaxBackupIndex=4


# FILE is file logger with rotation
log4j.appender.CLEARTOOL=org.apache.log4j.RollingFileAppender
log4j.appender.CLEARTOOL.layout=org.apache.log4j.PatternLayout
log4j.appender.CLEARTOOL.layout.ConversionPattern=%d [%-9t] %-5p %-16c{1} %x- %m%n
log4j.appender.CLEARTOOL.File=logs/cleartool.log
log4j.appender.CLEARTOOL.MaxFileSize=5000KB
log4j.appender.CLEARTOOL.MaxBackupIndex=4

Regards,

Antoine

-------- Original-Nachricht --------
> Datum: Thu, 18 Feb 2010 11:12:13 +0100
> Von: Daniel Tihelka <[email protected]>
> An: [email protected]
> Betreff: Re: [Cruisecontrol-user] using ${svnrevision} in shedule

> Hallo. No idea, please?
> Dan
> 
> On Monday 08 February 2010 13:50:23 Daniel Tihelka wrote:
> > Hallo everybody.
> > 
> > I have used ${svnrevision} in our cruisecontrol configuration, more
> >  specifically in <shedule /> section as:
> > 
> > <schedule interval="1000" >
> >   <composite>
> > 
> >     ...
> > 
> >     <!-- Create the file holding current SVN revision. It is actually
> >  command:
> > 
> >           awk 'BEGIN{ print "svnrevision.artic_library = 1234"
> > 
> > >"dist_1234/svn.revnum" }'
> > 
> >     -->
> >     <exec  command="awk" args="'BEGIN{ print &quot;
> > ${svnrevision.artic_library} = ${svnrevision}&quot; >&quot;
> > ${dist.dir}_${svnrevision}/svn.revnum&quot; }'" />
> > 
> > 
> >   </composite>
> > </schedule>
> > 
> > which worked for some time. Mysteriously, it started to fail with
> message:
> > 
> > awk: fatal: can't redirect to
> > `/var/spool/cruisecontrol/dist_${svnrevision}/svn.revnum' (No such file
> or
> > directory)
> > 
> > 
> > It seems that ${svnrevision} property is not "resolved" before the awk
> >  command is set. Well, I know that the property is not defined when I
> force
> >  the build manually (and I understand why it is so), but it is not set
> even
> >  when there is a change in SVN repository (detected correctly by CC)!
> > 
> > I have tried to delete all *.ser files and to restart CC, but it did not
> >  help. I don't understand, why it stopped working, as that really worked
> >  before. And I did not reinstall cruisecontrol since!
> > 
> > 
> > Thank you very much for your advice,
> > Dan
> > 
> > 
> > 
> > P.S. I have cruisecontrol-2.8.1-25.1 installed from RPM taken from
> > http://download.opensuse.org/repositories/home:/andtecheu/openSUSE_11.1
> > 

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
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.