Fortress Integration with CruiseControl.Net

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

pbanka
Posts: 9
Joined: Thu Apr 23, 2009 3:49 pm

Fortress Integration with CruiseControl.Net

Post by pbanka » Thu Apr 23, 2009 4:04 pm

Hi,

I am trying to automate the builds using CruiseControl.Net. I have the following section added to my config file:

<useWorkingDirectory>true</useWorkingDirectory>
<workingDirectory>D:/FortressWorkRoot/Project1</workingDirectory>
<sourcecontrol type="vault" autoGetSource="true">
<executable>D:\Program Files\SourceGear\Fortress Client\vault.exe</executable>
<username>username</username>
<password>password</password>
<host>fortress.server.com</host>
<repository>RepName</repository>
<folder>$/Clients/ProjectName</folder>
<ssl>false</ssl>
</sourcecontrol>

It does the build at the scheduled time, but it does't get the latest code all the time. Some times I see that the remote version of the file is 5 and even after the build is done, the local file version remains 4.

I noticed that while manually getting the latest from Visual Studio, I need to select the option - "Overwrite" - in order to get the latest version of the file that another user might have checked in. Is there something like 'overwrite' that I need to add to cruise control configuration as well so that it gets the latest version of all the files whenever doing a build?

Please let me know, this is a bit urgent.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by Beth » Fri Apr 24, 2009 3:32 pm

Do you by any chance have a client on that machine? If so, are you able to reproduce the issue with the client? That would help narrow the issue down some.
Beth Kieler
SourceGear Technical Support

pbanka
Posts: 9
Joined: Thu Apr 23, 2009 3:49 pm

Re: Fortress Integration with CruiseControl.Net

Post by pbanka » Fri Apr 24, 2009 3:41 pm

Yes the Fortress client is on the same machine. When we get the latest from Fortress Client, we need to select "Overwrite" option, otherwise it doesn't get the latest of files and sets their status as 'Needs Merge'. Which is what exactly is happening with Fortress and CC.Net Integration too. Is there an equivalent to "Overwrite" in Fortress that I can put into my CruiseControl config file to make sure it is always overwriting the local files with the latest version from Fortress?

Thanks

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by Beth » Fri Apr 24, 2009 3:54 pm

Try turning off the UseWorkingFolder option and turn on the CleanCopy option.
Beth Kieler
SourceGear Technical Support

pbanka
Posts: 9
Joined: Thu Apr 23, 2009 3:49 pm

Re: Fortress Integration with CruiseControl.Net

Post by pbanka » Fri Apr 24, 2009 4:17 pm

Nope, even that didn't work, few files still have higher remote version than the local.
eg: a file has Remote version as 6, local version 5.

Please give me more options to resolve this, its urgent.

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by ian_sg » Mon Apr 27, 2009 8:00 am

The cleanCopy option deletes everything before fetching source, so this shouldn't be possible. What do the logs say? Were files in use, preventing their deletion? Are files being modified after a build?
Ian Olsen
SourceGear

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by ian_sg » Mon Apr 27, 2009 8:05 am

Also, if you had turned off the useWorkingFolder option, a Vault client wouldn't know the version of a file, all files would have status Unknown. Did you apply the settings to the wrong project, maybe?
Ian Olsen
SourceGear

pbanka
Posts: 9
Joined: Thu Apr 23, 2009 3:49 pm

Re: Fortress Integration with CruiseControl.Net

Post by pbanka » Mon Apr 27, 2009 9:37 am

I can try cleanCopy options again, but this is not a gud option for us. We need to see in every build what changed. cleanCopy will just treat everything as the latest, we do not want that. Cruise Control actually shows in each build what changed since the last build. That will not make sense then.

Please give me some other useful options. I am able to understand why can Fortress not get the latest version of a file.

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by ian_sg » Mon Apr 27, 2009 9:39 am

CruiseControl is going to show you what changed for each build regardless of how the cleanCopy or useWorkingFolder options are set.
Ian Olsen
SourceGear

pbanka
Posts: 9
Joined: Thu Apr 23, 2009 3:49 pm

Re: Fortress Integration with CruiseControl.Net

Post by pbanka » Mon Apr 27, 2009 11:21 am

As I said earlier, the cleanCopy option is not working for me. I tried it again and I can still see files with different Remote and local versions. This is my config file -

<useWorkingFolder>true</useWorkingFolder>
<workingDirectory>D:/FortressWorkRoot</workingDirectory>
<sourcecontrol type="vault" autoGetSource="true">
<executable>D:\Program Files\SourceGear\Fortress Client\vault.exe</executable>
<username>username</username>
<password>password</password>
<host>fortress.server.com</host>
<repository>Rep1</repository>
<folder>$/Client1</folder>
<ssl>false</ssl>
<cleanCopy>true<cleanCopy>
<workingDirectory>D:/FortressWorkRoot</workingDirectory>
</sourcecontrol>

I have so many files whose Remote version is higher than the local. Please let me know how can I make sure to get the latest when Cruise Control automated build is being done.

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by ian_sg » Mon Apr 27, 2009 11:25 am

cleanCopy deletes the entire folder before fetching the source. If you've got old versions of files, the delete isn't occurring. Do you have any clues why that might be? Are files in use? What does the CruiseControl log say?
Ian Olsen
SourceGear

pbanka
Posts: 9
Joined: Thu Apr 23, 2009 3:49 pm

Re: Fortress Integration with CruiseControl.Net

Post by pbanka » Mon Apr 27, 2009 11:37 am

nope, nothing is in use. It is purely a build machine, we don't do any development on that machine, so no files are in use. This is wht the log says -

<cruisecontrol project="ProjName">
<request source="ccnet" buildCondition="ForceBuild">ccnet triggered a build (ForceBuild)</request>
<modifications>
<modification type="Deleted">
<filename>StandAlone</filename>
<project>Project1Solution</project>
<date>2009-04-27 10:07:38</date>
<user>Ccnet</user>
<comment />
<changeNumber>42410</changeNumber>
</modification>
</modifications>
<build date="2009-04-27 10:08:37" buildtime="00:00:08" buildcondition="ForceBuild"></build>
</cruisecontrol>

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by ian_sg » Mon Apr 27, 2009 11:52 am

You probably need to turn on verbose logging to get some more detailed information. I don't remember off the top of my head where that is (I think it's in the ccnet.exe.config or ccnet.service.config, depending on which server you're running), but the CC.NET documentation will say.
Ian Olsen
SourceGear

pbanka
Posts: 9
Joined: Thu Apr 23, 2009 3:49 pm

Re: Fortress Integration with CruiseControl.Net

Post by pbanka » Mon Apr 27, 2009 12:19 pm

I would also like to add here that its not that it doesn't get the latest version at all. It gets like 6 out of 10 checked in files, but not all.

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: Fortress Integration with CruiseControl.Net

Post by ian_sg » Fri May 01, 2009 2:48 pm

Were you able to resolve this?

Do you have a verbose log that gives us an idea why cleanCopy wasn't working?
Ian Olsen
SourceGear

Post Reply