我正在尝试建立一个构建链,通过各个构建阶段传播修改历史。我的第一个想法是 modifyWriter/modificationReader 对,但我无法让读者阅读结果。有没有人有任何例子或提示?
我正在使用最新的 CC.NET 1.4.4 SP1。谢谢!
我正在尝试建立一个构建链,通过各个构建阶段传播修改历史。我的第一个想法是 modifyWriter/modificationReader 对,但我无法让读者阅读结果。有没有人有任何例子或提示?
我正在使用最新的 CC.NET 1.4.4 SP1。谢谢!
玩了一会儿就知道了
请注意,您需要最新版本的 CC.NET,我认为是 1.4.3 或更高版本。这是从 1.4.4 SP1 开始的。
我第一次尝试使用 1.4.0,但旧版本中不存在 ModificationReader 任务。
<cruisecontrol>
<!--WATCH SANDBOX CONTINUOUS IS A TRIGGER TO CONTINUOUS BUILD AND INDIRECTLY FULL BUILD -->
<project name="WatchSandboxContinuous" queue="TestQ" queuePriority="4">
<triggers>
<intervalTrigger/>
</triggers>
<sourcecontrol type="your_source_control_type">
...
</sourcecontrol>
<tasks>
<modificationWriter>
<filename>mods.xml</filename>
<path></path>
<appendTimeStamp>True</appendTimeStamp>
</modificationWriter>
<nullTask />
</tasks>
</project>
<!--BUILD SANDBOX CONTINUOUS WOULD DO A FAST CONTINUOUS BUILD AND TRIGGER FULL BUILD -->
<project name="BuildSandboxContinuous" queue="TestQ" queuePriority="3">
<triggers>
<projectTrigger project="WatchSandboxContinuous" />
</triggers>
<prebuild>
<modificationReader>
<filename>mods.xml</filename>
<path>C:\Program Files\CruiseControl.NET\server\WatchSandboxContinuous\Artifacts</path>
<deleteAfterRead>True</deleteAfterRead>
</modificationReader>
</prebuild>
<tasks>
<!--Propagate modification history to next full build-->
<modificationWriter>
<filename>mods.xml</filename>
<path></path>
<appendTimeStamp>True</appendTimeStamp>
</modificationWriter>
<nullTask />
</tasks>
</project>
<!--BUILD SANDBOX FULL WOULD DO A FULL REBUILD AT NIGHT WITH ANY ADDITIONAL TASKS -->
<project name="BuildSandboxFull" queue="TestQ" queuePriority="2">
<triggers>
<multiTrigger operator="And">
<triggers>
<projectTrigger project="BuildSandboxContinuous" />
<scheduleTrigger buildCondition="ForceBuild" time="23:00" />
</triggers>
</multiTrigger>
</triggers>
<prebuild>
<modificationReader>
<filename>mods.xml</filename>
<path>C:\Program Files\CruiseControl.NET\server\BuildSandboxContinuous\Artifacts</path>
<deleteAfterRead>True</deleteAfterRead>
</modificationReader>
</prebuild>
<tasks>
<nullTask />
</tasks>
</project>
</cruisecontrol>