so, you have your continuous integration system up and running. you’re using Bamboo from Atlassian since they rock. however, you have a need to run some tests that require an X server to be running (like flexunit tests).

if you were using Hudson, there’s a plugin that will start/stop Xvnc for you. there’s demand for a Bamboo plugin, but nothing yet.

however, you don’t really need a plugin! if you’re using maven 2.0, drop these three lines into ~/.mavenrc:

vncserver -kill :0
vncserver :0
export DISPLAY=:0

(be sure to run vncserver once as the user Bamboo runs as to set a password first).

then, when maven is launched, it will destroy the existing X session, start a new one, and set the display property properly. should anything go awry, you can always connect a VNC client to see the screen prior to the next build starting.

while it’d be nice to have it more automagic like what Hudson has, its easy enough to string a solution up :)

Tags: ,

2 Responses to “running an x server during a bamboo (or other sort of automated) build”

  1. SteveL Says:

    There’s a property you can set to run Java headless, and a headless frame buffer for X too…both are handy

  2. osi Says:

    yup, definitely.

    i need a “head” here since i’m forking the flash player, and it requires an x session.

    i went with xvnc vs the headless frame buffer as you can vnc into the session should things go awry (which happens with the flash player :) .. something you can’t do with xvfb.

Leave a Reply