.netcruisecontrol.netcruisecontrol

How to tell CruiseControl to use new value after updating ccnet.config while process is running?


When a cruise build is triggered it calls my build script. My Build scripts installs stuff using a version number. This version is not constant and quite random as I extract it at every install and need to use in the email subject. (decided cruise labellers would not be a good solution)

I have defined in ccnet.config <cb:define version="" /> where I use my build script to update during the build. But since this update is done while the build is running cruise already has read the config file and it takes the value prior to the build.

I want to take the value during the build. This value is displayed in the email subject like:

<publishers>
    <email>
      <subjectSettings>
        <subject buildResult="Success" value="Version $(version) was installed " />
      </subjectSettings>
    </email>
</publishers>

Is there a way I can somehow tell Cruise to use the new value during the build when it is ready to email? Maybe if I figure out how this info is stored I can clean it up while the build is running, and will then display my new value.


Solution

  • I did not discover a way to update the version during the build so I split the curise control messages. If it fails it triggers the email using cruise control. If it is successful, it triggers an email via NAnt. By doing the successful part in Nant i am able to get the required version that triggered the build and also keep the cruise properties like ${CCNetProject}, ${CCNetBuildTime} etc.