0
剛剛開始使用CruiseControl.NET來處理我們正在處理的一個小型項目,並且我無法將XML文件合併到一旦生成爲完成。如何使用CruiseControl.NET中的發佈者合併文件
從我讀過的內容中,我需要確保合併標記出現在xml記錄器之前,並且該文件必須存在於指定的位置,這正是我在下面所做的。
<merge>
<files>
<file>C:\CCNet\xxx.xml</file>
</files>
</merge>
<xmllogger />
我試圖合併的文件原本是南特/ NUnit的輸出的結果,但是在嘗試診斷我消除了這個問題,通過如上從一個靜態XML文件合併的可能性一個已知的位置,仍然有相同的問題。
XML是否必須採用特定格式?我是不是加載XSL文件,以便電子郵件發佈者知道如何顯示它?
完整的構建腳本是在需要的情況下。
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<cb:define MainDir="C:\CCNet"/>
<cb:define WorkingDir="Working"/>
<cb:define ReleaseDir="Release"/>
<cb:define ArtifactsDir="BuildArtifacts"/>
<cb:define StateDir="State"/>
<cb:define name="BuildTask">
<nant>
<baseDirectory>$(MainDir)\$(WorkingDir)\NaturalTalent\$(Build)</baseDirectory>
<executable>C:\Program Files\nant-0.92\bin\NAnt.exe</executable>
<buildFile>default.build</buildFile>
<buildArgs>-D:CCNetReleaseDirectory=$(MainDir)\$(ReleaseDir)\NaturalTalent\$(Build)</buildArgs>
</nant>
</cb:define>
<cb:define name="CommonProjectSettings">
<state type="state" directory="$(MainDir)\$(StateDir)" />
<workingDirectory>$(MainDir)\$(WorkingDir)\NaturalTalent\$(Build)</workingDirectory>
<artifactDirectory>$(MainDir)\$(ArtifactsDir)\NaturalTalent\$(Build)</artifactDirectory>
<sourcecontrol type="git">
<repository>http://cruizecontrol:[email protected]/gitlab/nga.git</repository>
<workingDirectory>$(MainDir)\$(WorkingDir)\NaturalTalent\$(Build)</workingDirectory>
</sourcecontrol>
<publishers>
<merge>
<files>
<file>C:\CCNet\xxx.xml</file>
</files>
</merge>
<statistics />
<xmllogger />
<artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="50" />
<email from="[email protected]" mailhost="bart" mailport="25" includeDetails="true">
<users>
<cb:Users />
</users>
<groups>
<group name="developers">
<notifications>
<notificationType>Failed</notificationType>
<notificationType>Fixed</notificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
<xslFiles>
<file>xsl\header.xsl</file>
<file>xsl\compile.xsl</file>
<file>xsl\modifications.xsl</file>
</xslFiles>
</email>
</publishers>
</cb:define>
<project name="NaturalTalent (TRUNK) - Latest">
<cb:scope Build="Latest">
<cb:define name="Users">
<user name="Anton Felich" group="buildmaster" address="[email protected]" />
<!--<user name="David Ames" group="buildmaster" address="[email protected]" />
<user name="David Ames" group="buildmaster" address="[email protected]" />-->
</cb:define>
<cb:CommonProjectSettings />
<tasks>
<cb:BuildTask />
</tasks>
<triggers>
<intervalTrigger name="continuous" seconds="30" buildCondition="IfModificationExists" initialSeconds="5"/>
</triggers>
</cb:scope>
</project>
<project name="NaturalTalent (TRUNK) - Nightly">
<cb:scope Build="Nightly">
<cb:define name="Users">
<user name="Anton Felich" group="buildmaster" address="[email protected]" />
<!--<user name="David Ames" group="buildmaster" address="[email protected]" />-->
<!--<user name="David Ames" group="buildmaster" address="[email protected]" />
<user name="HouTan" group="buildmaster" address="[email protected]" />
<user name="MickHutchinson" group="buildmaster" address="[email protected]" />
-->
</cb:define>
<tasks>
<cb:BuildTask />
<nant>
<baseDirectory>$(MainDir)\$(WorkingDir)\NaturalTalent\$(Build)</baseDirectory>
<executable>C:\Program Files\nant-0.92\bin\NAnt.exe</executable>
<buildFile>default.build</buildFile>
<buildArgs>-D:CCNetReleaseDirectory=$(MainDir)\$(ReleaseDir)\NaturalTalent\$(Build)</buildArgs>
<targetList>
<target>test</target>
</targetList>
</nant>
</tasks>
<cb:CommonProjectSettings />
</cb:scope>
<triggers>
<scheduleTrigger time="23:30" buildCondition="ForceBuild" name="Nightly" />
</triggers>
</project>
</cruisecontrol>
轉過來這是一個n00b問題。 XML正在生成並正在成功合併到我的最終XML文件中。但是,由於我沒有爲合併內容加載XSLT轉換,因此沒有任何內容顯示在儀表板中。 – anton
現在有道理!很高興你解決了它。 – granadaCoder