通过CruiseControl.Net在电子邮件发布者subjectSettings块中使用动态参数 [英] Using dynamic parameters in email publisher subjectSettings block with CruiseControl.Net
问题描述
我正在尝试获取要在电子邮件
发布者的subjectSettings块中使用的动态参数。例如,
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>
我尝试使用$ {version}和$ [version]。当我使用$ [version],
时,整个主题行都是空的!
I have tried using ${version} and $[version]. When I use $[version], the entire subject line is empty!
例如,没有看到至少 Version BLANK已安装。,而是看到一个空的主题行:
For example, instead of seeing at least "Version BLANK installed.", I see only an empty subject line:
[Install:INFO] Emailing "" to joe
在这种情况下是否支持动态参数,如果是,我
做错了什么?
Are dynamic parameters supported in this case, and if so, what am I doing wrong?
推荐答案
基于提供的注释,我从CC.Net 1.5.7256.1升级到1.6.7349.5。 1.6版似乎可以正常运行。
Based on the comments provided, I upgraded from CC.Net 1.5.7256.1 to 1.6.7349.5. Version 1.6 seems to be working OK.
参数的正确格式为$ [parameter],如预期的那样。
The proper format for the parameters is $[parameter], as expected.
这篇关于通过CruiseControl.Net在电子邮件发布者subjectSettings块中使用动态参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!