【问题标题】:Add publish directory to ccnet header.xml将发布目录添加到 ccnet header.xml
【发布时间】:2014-08-22 03:47:00
【问题描述】:

我有一个 CruiseControl.net 版本,它编译所有二进制文件、创建安装并将安装文件和日志文件发布到服务器位置。 实际的最终目录名称是动态的,以在路径名称中包含 YYYYMMDD_HH_MM_SS。

Example: <server>\Path\2-Tuesday\MyBuild_2014_08_06_07_23_15

我包括发布者事件,以向我们的开发和 QA 团队发送电子邮件。在这封电子邮件中,我想包含构建的发布路径,以便用户更容易找到构建。

我想我想修改 /server/xls/ 中的 header.xls 文件 但是,我不确定如何包含路径?

我的发布脚本是一个 powershell 脚本。下面是一段代码sn-p

    $dOfWeek = (Get-Date).dayofweek.toString()
    $date = Get-Date
    $n = [int]$date.dayofweek
    $dest = Join-Path -Path $publishDir.value -ChildPath "$n-$dOfWeek"
    $day = Get-Date -Format yyyyMMdd
    $time = Get-Date -Format HH_mm_ss
    $pubFolder="Bld" + $day + "_" + $time 
    $publishPath=Join-Path -Path $dest -ChildPath $pubFolder

请注意,$publishDir 是传递给格式化 this 的函数的参数。

如何设置以便通知 ccnet 该路径,以及如何将值合并到 header.xls 中?

谢谢。 真挚地, 丹尼尔·李

【问题讨论】:

    标签: build cruisecontrol.net


    【解决方案1】:

    使用文件合并任务“通知”CC 您的自定义信息。该信息将显示在 CC xml 构建日志中。见:

    File Merge

    然后编辑 header.xsl 或 compile.xsl 将新的 xml 转换为 html 以显示在构建电子邮件中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-23
      • 2017-02-07
      • 1970-01-01
      • 2012-07-06
      • 2014-03-26
      • 1970-01-01
      • 2013-04-13
      • 1970-01-01
      相关资源
      最近更新 更多