How to pass an integration property to a batch file with CruiseControlNet ?
Posted
by TridenT
on Stack Overflow
See other posts from Stack Overflow
or by TridenT
Published on 2010-04-07T11:41:41Z
Indexed on
2010/04/07
17:03 UTC
Read the original article
Hit count: 215
In the build log of my project, i can see these properties:
<integrationProperties>
<CCNetProject>Gdet_T</CCNetProject>
...
<LastChangeNumber>0</LastChangeNumber>
<LastIntegrationStatus>Success</LastIntegrationStatus>
<LastSuccessfulIntegrationLabel>25</LastSuccessfulIntegrationLabel>
<LastModificationDate>4/6/2010 1:29:04 PM</LastModificationDate>
<LastChangeNumber>10841</LastChangeNumber>
</integrationProperties>
I want to pass the property CCNetProject
and LastChangeNumber
to a batch file. it works well with CCNetProject
, as it can be used in the batch as an environment variable %CCNetProject%
.
But it doesn't work with other properties (those are not starting with the CCnet
prefix) as LastChangeNumber
or LastModificationDate
.
I tried to pass it as environment variable, but it fails !
<exec>
<executable>$(WorkingFolderBase)\MyBatch.bat</executable>
<baseDirectory>$(WorkingFolderBase)\</baseDirectory>
<buildArgs>$(LastModificationDate)</buildArgs>
</exec>
I tried to pass it as argument, but it fails:
<exec>
<executable>$(WorkingFolderBase)\MyBatch.bat</executable>
<baseDirectory>$(WorkingFolderBase)\</baseDirectory>
<environment>
<variable>
<name>svn_label</name>
<value>"${LastModificationDate}"</value>
</variable>
</environment>
</exec>
The results is always the same when I display the parameter or variable : empty string or the variable name $(svn_label)
I'm sure it is simple, but ... I can't find ! Any idea ?
© Stack Overflow or respective owner