I'm rebuilding our build VM and was hoping to migrate to Continua CI but I ran into a few issues.
- FYI, the installation still report that the share could not be created (Windows 7 SP1 using build 2522), I created it manually, no big deal.
- I wasn't able to set it up using our internal Postgres server, I kept getting a connection error. Do I need to install a specific OLE DB driver to make it work?
- Once everything is running I created a project, configuration, added a stage to run my FB project, but keep getting an error when trying to run the project. "$Source.MyRepository$\MyProject-CURRENT.fbp7" doesn't seems to work (I get the following error "Exception: Win32Exception Message: The directory name is invalid Stack Trace: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at Continua.Stepping.Actions.ExecuteAction`1.Execute(TContext context)"). I'm not sure if "$Source.MyRepository$" is litteral or if I need to replace something with my repository name (I've tried with "$Source.Scripts$\MyProject-CURRENT.fbp7" (my repository is named "Scripts"), but it cannot find the file either (Project File : C:\CI_WS\Ws\2\Source\Scripts\MyProject-CURRENT.fbp7 - not found!)
- I use an external INI file to store the current build number, commit revision, ... which is loaded from the FB script. I suppose this should be moved to variables within Continua CI, but how can I access or set Continua CI variables from within an FB script?
- Also, how can I load my INI (which is in my repository) from within FB. Is there a way to know which directory I'm running from or do I have to use an absolute path?
- Last question, how can I change the build directory for each agent? We use a ramdisk with FB for better performance.
Share Creation seems to be hit or miss… the install is supposed to be running with admin privileges, but sometimes we see access denied. I have tried this with a bunch of different installer tools and see the same issue on the same machines with different installers.
As for postgres, we are using NHibernate with npgsql.dll, I’m note sure what you need to specify to for the connection string, will have to check.
To run a FinalBuilder projects, the FB project needs to be in a repository, and that repository needs to be hooked up to your configuration in Continua. If for example you repository is named Scriptsin continua, then by default the repository will be checked out into the Workspace folder in
\Source\Scripts
The $Source$ object is a a way of making sure you have the paths correct, so in the above example you would use :
$Source.Scripts$\MyProject-CURRENT.fbp7
Files are not showing up there, then check that the repository is actually hooked up to your configuration (if it’s a global or project level repo) and that it’s actually finding changesets. Secondly, double click on the Stage in the Stages page of the Config wizard, and switch to the Repository Rules page and turn on “Log Repository Files Copied” option. That way you can see what files are actually being copied into the workspace. Repository Rules are explained here : http://wiki.finalbuilder.com/x/_QAZ
Continua CI is designed to manage the build number etc itself. You can however override that by setting Continua CI variables from within FinalBuilder, the most recent builds of FinalBuilder 7 include a new action for this “Continua CI - Set Variable”. You can also pass variables from Continua CI to FinalBuilder. You do need to make sure your FinalBuilder project is designed to run in any folder, create a variable to hold your root folder (.eg. %PROJECTROOT%) and make all path references in the project based on that variable. You can pass the CI build’s workspace folder into FinalBuilder (the FinalBuilder Action in Continua CI allows you to set FB variables).
The agent’s workspace folders are configured from the Continua.Agent.Service.exe.config file in the agent install folder. Note that the ramdisk may not work if it relies on a user login, the ram disk would need to be in place when the service starts.
For now I've reinstalled using the provided PostgreSQL server. I'll try to debug the error I had further but it's not critical for us.
The FinalBuilder server -> Continua CI transition was not trivial for me but after a few hours with it I'm beginning to grasp it. I had to re-factor a good part of our scripts to let Continua handle the build number and version, but it will be much cleaner this way.
When using the finalbuilder action "Continua CI - Set Variable" I suppose Continua handle the persistence of this variable automatically?
We purposely did not think about the transition too much when designing Continua CI, so that it would not be hamstrung by the old design of FB Server. I think this worked well, Continua CI is a much better product because of that. Yes, moving from FB Server to Continua CI does take some work, the two products are very different, but the results are worthwhile, you end up with a much more capable and scalable build process.
Continua CI doesn’t do persistent variables like FinalBuilder does, however those variables you set during the build are ‘remembered’ for the life of the build. So if you set the variables in one stage on an agent, and the next stage runs on a different agent, it will still see the value set in the first stage on the other agent.