开发者

Why are my CruiseControl.Net fields not available in my build script?

I have a .Net 4.0 project that I wish to build in CruiseControl.Net.

It is now set up, so it builds a publish-build and works perfectly except for the version number, where I can't reference CCNetLabel, that I wish to use for the last digit of the version number.

When I do try to reference the field/variable, I'm told that it's unknown.

It would seem that CC.Net does not 'transfer' the values to my script, but what am I doing wrong?

Below ccnet.config and product-ci.config

Thanks for any suggestions,

Anders, Denmark

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
  <cb:include 
        href="configs/product-ci.config" 
        xmlns:cb="urn:ccnet.config.builder"/>
</cruisecontrol>

<cb:scope xmlns:cb="urn:ccnet.config.builder"
    CCNetWebServer="dkapp04"
    TriggerInterval="10"
    WorkingDir="d:\ccnet.output\product"
    msBuildTargets="Publish"
    excludedNunitCategories=""
    publishUrl="http://dkapp04/product/Dev/"
    destinationFolder="d:\ccnet.output\product\Dev"
    version ="1.0.0.${CCNetLabel}"
>
  <project
   name="product"
   webURL="http://$(CCNetWebServer)/ccnet/server/local/project/product-ci/ViewLatestBuildReport.aspx"
   queue="default">

    <state type="state" directory="C:\Program Files\CruiseControl.NET\server\States\" />

    <triggers>
      <intervalTrigger seconds="$(TriggerInterval)" />
    </triggers>

    <sourcecontrol type="svn">
      <trunkUrl>https://dkapp04.company.com/svn/product/trunk</trunkUrl>
      <workingDirectory>$(WorkingDir)</workingDirectory>
      <cleanCopy>false</cleanCopy>
      <executable>C:\Program Files\VisualSVN Server\bin\svn.exe</executable>
    </sourcecontrol>

    <tasks>
      <msbuild
        executable = "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
        workingDirectory = "$(WorkingDir)\src"
        projectFile="BuildScript.proj"
        buildArgs = "/p:Configuration=Debug /p:excludedNunitCategories=$(excludedNunitCategories) /p:DestinationFolder=$(destinationFolder) /p:PublishUrl=$(publishUrl) /p:ApplicationVersion=$(version)"
        t开发者_开发知识库argets = "$(msBuildTargets)"
        timeout = "100"
        logger = "C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll"
          />
    </tasks>
  </project>
</cb:scope>


The CCNetLabel is passed as a property to the MSBuild project file and available inside it for use.I use it like this with a default value.

<PropertyGroup>
<CCNetLabel Condition="$(CCNetLabel)==''">0.0.0.0</CCNetLabel>
</PropertyGroup>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜