-
-
Notifications
You must be signed in to change notification settings - Fork 2
Continous Integration with Hudson Jenkins
Note: This page contains old documentation from 2010, but may still be helpful.
Hudson CI was renamed/forked to Jenkins CI on 1/30/2011 because of disagreements between Oracle and the Hudson developers.
Installing Hudson/Jenkins On Windows
For running FieldWorks unit tests we use a separate X server on Linux so that windows the tests create don't pop up in our face. In the past we had a script that started Xvfb and Xephyr, ran the tests and terminated Xvfb and Xephyr. But the script caused Hudson/Jenkins to consider the build as successful even when it failed.
It turns out that Hudson/Jenkins takes care of terminating the X server - but we're still left with a warning message about resource leaks.
The easiest seems to be to use the Hudson Xvnc Plugin:
- install a VNC server (e.g. vnc4server on Ubuntu 9.10)
- login as user that runs Hudson/Jenkins process (sudo su - hudson)
- start vncserver once since that asks for password (vncserver). Note the display number this displays.
- end vncserver: (vncserver -kill <displaynumber></displaynumber>, e.g. vncserver -kill :1)
- in Hudson/Jenkins, install Xvnc Plugin
- in project settings, check "Run Xvnc during build"
- add a build step "Execute shell" that sets the TMPDIR environment variable and calls NAnt:
- TMPDIR=/tmp/$BUILD_TAG
- (cd Bld && cp -f _user.mak.lnx.example _user.mak.lnx) || false
- . $WORKSPACE/environ
- (cd Bld && $WORKSPACE/Bin/nant/bin/nant remakefw-hudson)
- You have to install the CompileService:
- Unzip and build Bin/RunAsUser.zip
- Install the the .msi file that gets built: CompileServiceSetup.msi
- Modify the CompileService in Control Panel/Services: Logon on as: Local System account; check Allow service to interact with desktop
- Copy the files compiled by the project RunAsUser in a directory that's in the path
- I installed Hudson/Jenkins as server on Windows; this might not be necessary
- I run Hudson/Jenkins as user Hudson
- Log in as user Hudson and kick off a "remakefw". This should succeed.
- Now set up a project in Hudson/Jenkins. Add a build step "Execute Windows Batch file":
- cd Bld
- ..\Bin\nant\bin\nant -D:localsys-workaround=True remakefw-hudson
- On Win7/Vista I disabled UAC
- I had problems with the Build Publishing plugin - most often the builds weren't published but remained in the queue on the Windows machine. This turned out to be a problem with Avira AntiVir WebGuard that caused to much delay so that the build publisher timed out. I had to disable WebGuard.