English 中文(简体)
cruisecontrol <buildargs> nant parameter not being passed
原标题:

I ve been trying to use the param in my cruisecontrol build config file to no avail. When checking the cruisecontrol log file, whatever buildargs I try to pass are NOT passed to the call to nAnt.

Here s the nant task:

<nant>
  <buildArgs>-D:CCFoo="Unknown" -D:foo="$(foo)"</buildArgs>
  <executable>C:MCRTrunkBuildLibraryNAnt.exe</executable>
  <baseDirectory>C:MCRTrunk	ek.Build</baseDirectory>
  <buildFile>tek.build</buildFile>
  <targetList>
    <target>cc</target>
  </targetList>
  <buildTimeoutSeconds>1800</buildTimeoutSeconds>
</nant>

Here s what appears in the logfile for that call to nant:

2010-01-28 08:45:12,815 [TekWebsite:DEBUG] Starting process [C:MCRTrunkBuildLibraryNAnt.exe] in working directory [C:MCRTrunk	ek.Build] with arguments [-nologo -buildfile:tek.build -logger:NAnt.Core.XmlLogger -D:CCNetArtifactDirectory="C:Program Files (x86)CruiseControl.NETserveruilds" -D:CCNetBuildCondition=ForceBuild -D:CCNetBuildDate=2010-01-28 -D:CCNetBuildTime=08:45:12 -D:CCNetFailureUsers= -D:CCNetIntegrationStatus=Unknown -D:CCNetLabel=50 -D:CCNetLastIntegrationStatus=Failure -D:CCNetListenerFile="C:Program Files (x86)CruiseControl.NETserveruildsClarksWebsite_ListenFile.xml" -D:CCNetModifyingUsers= -D:CCNetNumericLabel=50 -D:CCNetProject=TekWebsite -D:CCNetProjectUrl=http://cor-str-mcr08/ccnet/server/local/project/TekWebsite/ViewProjectReport.aspx -D:CCNetRequestSource=Dashboard -D:CCNetWorkingDirectory="C:Program Files (x86)CruiseControl.NETserver" cc]

I m thinking that maybe there s a config setting for cruisecontrol that tells it to ignore buildargs?

I ve tried reordering the lines in the nant task, putting buildargs at the top as you see, and a few places in the middle and the bottom. I ve tried the different syntaxes that are available for buildargs such as:

-D:CCFoo="Unknown" -D:CCFoo=Unknown -DCCFoo=Unknown

最佳回答

I figured this out - the ccnet.config file that s used by the ccnet daemon process won t reload the build config file until either:

a) the process is restarted OR
b) the ccnet.config file is altered or touched in some way.

So I just went into C:Program Files (x86)CruiseControl.NETserver.ccnet.config and added a space, saved and now the buildargs are being passed to nant. woohoo!

问题回答

I had the exact same problem running some bat file but my reason was I has used:

<msbuild>
  ...

instead of

<exec>
  ...




相关问题
Create directory using Nant

Not sure if I m just totally missing it but I couldn t not figure out how to create a new directory using Nant. Is there built in functionality to do this? Can I just use the command prompt? I tried ...

Setting write permissions on godaddy hosting

I have godaddy asp.net hosting. Every time I upload the build, it’s a manual laborious task of setting write permissions (to folders) through the web interface. Is this any way to automate this ...

What are solid NMaven or build servers for .NET alternatives?

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in the C#/.NET world as its larger cousin was in the Java ...

Gallio and MbUnit in NAnt

I am trying to use Gallio (v3.1)/MbUnit/NCover to run a unit test in my C# code, as part of the build process for my continuous integration system. I can get Gallio.Echo.exe to execute the tests and ...

TeamCity NUnit test result visualisation

Is there any way to produce visual results of NUnit tests from within TeamCity s "Tests" tab, currently my NAnt script outputs an .xml file of the results using the following task: <nunit2 ...

building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

热门标签