我在Cruisecontrol.net xml文件中有这个块:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project name="MyProject">
<artifactDirectory>C:\Program Files (x86)\CruiseControl.NET\Mydashboard</artifactDirectory>
<sourcecontrol type="p4">
<view>//Myprojectfolder/Code/...</view>
<executable>c:\Program Files\Perforce\p4.exe</executable>
<client>Myworkspace</client>
<user>John</user>
<applyLabel>false</applyLabel>
<port>PERFORCEPR123:10080</port>
<autoGetSource>true</autoGetSource>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework64\v3.5\MSBuild.exe</executable>
<workingDirectory>D:\Workspace\Myworkspace\Code\src</workingDirectory>
<projectFile>Myproject.sln</projectFile>
<targets>Build</targets>
<timeout>1000000</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger>
<buildArgs>/v:minimal /noconlog /p:Configuration=Release</buildArgs>
</msbuild>
</tasks>
<publishers>
<xmllogger logDir="C:\Program Files (x86)\CruiseControl.NET\Mydashboard\Buildlogs" />
<buildpublisher>
<sourceDir>D:\Workspace\Myworkspace\Code\src\newsrc\Webapplication.site</sourceDir>
<publishDir>D:\deployment\Webapplication.site</publishDir>
<useLabelSubDirectory>false</useLabelSubDirectory>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
</publishers>
</project>
</cruisecontrol>
但是,当我构建我的项目时,我收到以下错误:
BUILD EXCEPTION
Error Message:
ThoughtWorks.CruiseControl.Core.CruiseControlException: Perforce GetModifications failed: c:\Program Files\Perforce\p4.exe -s -c Myworkspace -p PERFORCEPR123:10080 -u John -P john123 changes -s submitted //Myprojectfolder/Code/......@2014/01/15:08:13:20,@2014/01/15:08:14:20
Error output from process was:
error: Perforce password (P4PASSWD) invalid or unset.
exit: 1
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Perforce.P4.Execute(ProcessInfo process, String description)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Perforce.P4.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModificationsWithLogging(ISourceControl sc, IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
有解决方法吗?
由于
答案 0 :(得分:1)
我怀疑CC只是使用Perforce命令行客户端。要解决这个问题,我会:
1)向Perforce添加一个组,并将Timeout设置为无限制。 2)将运行CC任务的用户添加到Perforce组 3)从构建机器运行'p4 -u login'
这将存储一个永久持久的本地票证来验证用户。如果您需要一个帐户来运行CC下的工具,请填写此表单,Perforce将为您提供免费的后台用户:
http://www.perforce.com/support-services/request-background-user
答案 1 :(得分:0)
如果您的票证文件错误,您将收到此错误。删除票证文件,然后运行您的工具或运行p4登录以重新创建票证。
* nix位置:〜/ .p4tickets
Windows位置:C:\ Documents and Settings \\ p4tickets.txt