Using dynamic parameters in email publisher subjectSettings block with CruiseControl.Net

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2010-06-10T17:33:04Z Indexed on 2010/06/10 17:42 UTC
Read the original article Hit count: 544

Filed under:
|

I am trying to get dynamic parameters to be used in the email publisher's subjectSettings block. For example,

<project> 
    ... 
    <parameters> 
      <textParameter> 
        <name>version</name> 
        <display>Version to install</display> 
        <description>The version to install.</description> 
        <required>true</required> 
      </textParameter> 
   </parameters> 
   <tasks> 
   ... 
   </tasks> 
   <publishers> 
   .... 
   <email includeDetails="TRUE"> 
        <from>buildmaster</from> 
        <mailhost>localhost</mailhost> 
        <users> 
          <user name="Joe" group="buildmaster" address="jdavies" /> 
        </users> 
        <groups> 
          <group name="buildmaster"> 
            <notifications> 
              <notificationType>Always</notificationType> 
            </notifications> 
          </group> 
          <group name="users"> 
            <notifications> 
              <notificationType>Success</notificationType> 
              <notificationType>Fixed</notificationType> 
            </notifications> 
          </group> 
        </groups> 
        <subjectSettings> 
          <subject buildResult="Success" value="Version ${version} 
installed." /> 
          <subject buildResult="Fixed" value="Version ${version} fixed 
and installed." /> 
        </subjectSettings> 
        <modifierNotificationTypes> 
          <notificationType>Success</notificationType> 
        </modifierNotificationTypes> 
      </email> 
   </project>

I have tried using ${version} and $[version]. When I use $[version], the entire subject line is empty! Are dynamic parameters supported in this case, and if so, what am I doing wrong?

© Stack Overflow or respective owner

Related posts about cruisecontrol.net

Related posts about cc.net