Cerberus 1.0

Posted in Code on July 11th, 2011 by Pyroka

Despite the job issues I have been working away on various projects, including Cerberus, which has now reached a state where I’m happy to stick a 1.0 label on it and put it to use (although it has been being used to compile LibCT for some time now). It’s had a few improvements since the last video, but not enough of anything visual to make another video out of it, so I’ll just show it in screenshots.

Firstly, and least importantly, I finally replaced the ugly place-holder ’compiling’ animation:

New busy icon

Just picture it animating

You can now pass options to build scripts. When you create a build script it has an ‘options’ dictionary, two types of option are available text (which can have a default value) and lists (default value is the first item), when you add one of these build steps to a repo, the option is displayed below:

Showing the build step options, there is HG, Premake and Compile build steps, the HG build step has a 'branch' option which is set to the value 'development'

Setting the branch we want the HG build step to update to

So here we’re changing the branch that the HG build step should update to, the default is ‘default’ (specified by the options map) which is the name of the default branch in a Mercurial repo.

Next BuildMaster now contains code to attempt to automatically build a repo when a change is detected, currently this only supports parsing an RSS feed (as Mercurial repos produce an RSS feed by default, and RSS is perfect for this). Originally I considered setting this up with hooks, but it seemed like it would be difficult to account for the Cerberus server not having a constant IP and being on a different machine to the repositories, however, since RSS feeds allow for active monitoring of the repo, and make it easy to determine what the last built commit was (each RSS entry has a unique ID) it made for a very nice solution to those issues.

Text box showing the auto build URL

For a repo to be eligible for automatic building, you need to store an Auo build URL

Currently the auto-build system only requires a per-repo URL, this was so that in future, the system can be expanded to handle other source control systems (for example parsing an SVN repository for the revision number of the most recent commit).

Other than that there has been much tidying up, I moved a lot of code to the BuildMaster class and renamed cerberus.py to server.py to more accurately reflect it’s function. BuildMaster now acts as the go-to class for the server to interact with, with server.py merely conditioning data to hand to BuildMaster and formatting data that is returned from it. A general code clean-up was also carried out, and I finally got around to including a ‘Licence.txt’, containing the terms of the licence the source is released under (MIT Licence).

Feel free to grab the source from BitBucket, no guarantees that it will work for you or that the code is good, it works for me and that’s good enough.

Right, onto the next project.

Tags: ,

Recent Absence

Posted in Uncategorized on July 11th, 2011 by Pyroka

So this is the post where I apologise for not posting, however, unlike most posts along this vein I have an excuse!

As you may or may not know, I have been working at The University of Derby on a game-related research project, well, unfortunately the project (temporarily) ran out of money. (They will be applying for more soon, and are hopeful of getting it) to add to this, is my rather pressing need to have a permanent job by the end of the year. These things combined meant that it was time for me to leave that job and venture forth to find new challenges, and, I am happy to announce, I have indeed found permanent gainful employment! At Eurocom in Derby working on a very exciting project that I can say nothing about!

Anyway, the job search kept me rather busy so projects and blog-posts took a back seat for a little while, normal service should resume soon.