Reputation: 113
I have this block in the Cruisecontrol.net xml file:
<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>
But,when i build my project i am getting the below error:
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)
Is there a workaround for this?
Thanks
Upvotes: 4
Views: 12132
Reputation: 2416
If you have a bad ticket file, you will get this error. Delete the ticket file, then run your tool or run p4 login to recreate the ticket.
*nix location: ~/.p4tickets
Windows location: C:\Documents and Settings\\p4tickets.txt
Upvotes: 1
Reputation: 4850
I suspect CC is just using the Perforce command line client. To workaround this I would:
1) Add a group to Perforce and set the Timeout to unlimited. 2) Add the user running the CC task to the Perforce group 3) From the build machine run 'p4 -u login'
This will store a local ticket that lasts forever to authenticate the user. If you need a an account to run tools like CC under, fill out this form and Perforce will give you a free background user:
http://www.perforce.com/support-services/request-background-user
Upvotes: 1