June 2012

Installing Jenkins on Ubuntu 11.10

I use Jenkins every day for running different tasks. For example I use it to run cron on sites, build new platforms in Aegir, and run various shell scripts that do different things. It's really easy to setup, but kinda tricky.

As root, or with sudo you run the following commands:

$ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
$ echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list
$ aptitude update
$ aptitude safe-upgrade
$ aptitude install jenkins openjdk-7-jre

The jdk that jenkins comes with by default doesn't work well and you'll run into problems like this. After that, start jenkins

$ /etc/init.d/jenkins start

And you should have a jenkins instance running at http://localhost:8080. Now it's time to secure it and start building things.

Tags: 

I'm talking at DrupalCamp Charlotte tomorrow!

Yep, if you're hanging out at DrupalCamp Charlotte tomorrow come by and check out my talk about Aeigr, Jenkins, Fabric, and Git.

Continuous Drupal deployment with Aegir, Jenkins, Fabric and Git

Fixing git 1.7.10's merging

So, I use git merge a lot with different scripts and in 1.7.10 they introduced a bit of an annoying new change to how git merge functions. In older versions it would automatically set a message, something like "Merged develop into master." Now it allows you to specify a message for the merge, which isn't a bad thing. It just reeked havoc on some of my deployment scripts.

There is a simple fix, in the beginning of your script add these lines:

GIT_MERGE_AUTOEDIT=no
export GIT_MERGE_AUTOEDIT

This will tell git to ignore the merge commit message. You can also use the --no-edit flag instead of the environment variable.