开发者

cruisecontrol <buildargs> nant parameter not being passed

开发者 https://www.devze.com 2022-12-18 04:06 出处:网络
I\'ve been trying to use theparam 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.

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:\MCR\Trunk\BuildLibrary\NAnt.exe</executable>
  <baseDirectory>C:\MCR\Trunk\tek.Build</baseDirectory>
  <buildFile>tek.build</buildFile>
  <targetList>
    <target>cc</target>
  </targetList>
  <buildT开发者_如何学PythonimeoutSeconds>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:\MCR\Trunk\BuildLibrary\NAnt.exe] in working directory [C:\MCR\Trunk\tek.Build] with arguments [-nologo -buildfile:tek.build -logger:NAnt.Core.XmlLogger -D:CCNetArtifactDirectory="C:\Program Files (x86)\CruiseControl.NET\server\builds" -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.NET\server\builds\ClarksWebsite_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.NET\server" 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.NET\server.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>
  ...
0

精彩评论

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