How to pass integration property to batch file using CruiseControlNet?

In the build log of my project, I can see these properties:

<integrationProperties>
  <CCNetProject>Gdet_T</CCNetProject>
  ...
  <LastModificationDate>4/6/2010 1:29:04 PM</LastModificationDate>
  <LastChangeNumber>10841</LastChangeNumber>
</integrationProperties>

I want to transfer the property CCNetProject, and LastChangeNumberin a batch file. it works well with CCNetProject, because it can be used in a package as an environment variable %CCNetProject%.

But it does not work with other properties (those that do not start with a prefix CCnet), like LastChangeNumberor LastModificationDate.

I tried passing it as an argument, but it fails!

<exec>
  <executable>$(WorkingFolderBase)\MyBatch.bat</executable>
  <baseDirectory>$(WorkingFolderBase)\</baseDirectory>
  <buildArgs>$(LastModificationDate)</buildArgs>
</exec>

I tried passing it as an environment variable, 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 are always the same when displaying a parameter or variable: empty string or variable name $(svn_label)

, , ... ! ?

+5
2

ok, . SvnRevisionLabeller, svn. CCNetLabel environement.

http://code.google.com/p/svnrevisionlabeller/

<labeller type="svnRevisionLabeller"> 
  <url>http://mysvnrootproject/trunk</url> 
</labeller>
0

CCNET :

CCNetArtifactDirectory 
CCNetBuildCondition 
CCNetBuildDate 
CCNetBuildTime 
CCNetFailureUsers 
CCNetIntegrationStatus 
CCNetLabel 
CCNetLastIntegrationStatus 
CCNetListenerFile 
CCNetModifyingUsers 
CCNetNumericLabel 
CCNetProject 
CCNetProjectUrl 
CCNetRequestSource 
CCNetUser 
CCNetWorkingDirectory 

LastIntegrationStatus . CCNetLastIntegrationStatus, LastModificationDate, . .

<buildArgs> <environment>, CCNET . , CCNET ( ), - <buildArgs>$(CCNetProject)</buildArgs> .

.

, .

( ):

$[$CCNetLabel] CCNET, , .

, , . - , CCNetLabel - , . , , . CCNET , . ?

+8

All Articles