Continuous Testing
We're running an experimental \[running a Jenkins Continuous Integration (CI) server at http://buildbotbuilds.sourceforgeapache.net/ BuildBot\] server; after every check-in to SVN, several [BuildBot] clients will automatically download the latest code and run "make test". The results \[http://buildbot.spamassassin.org:8010/ are visible here\]. Wiki Markup
Notes on Setting Up a BuildBot Slave
We currently have build slaves building
- trunk using Red Hat 7.3's perl
- trunk using vanilla perl 5.6.1
- trunk using vanilla perl 5.8.5 with threading
- b3.0 using Red Hat 7.3's perl
(among others.)
If you fancy it, and are running an OS different from the above, it might be worthwhile setting up a build slave to extend this... non-linux platforms especially would be great. "make test" needs to be passing on this platform, though, as otherwise we'll be bombarded with "test failure" messages, even if the tree builds on other OSes.
Notes:
For now, only committers' machines will be added to the BuildBot slaves list – we need to be sure that you're contactable, and we're not sure if there's any security issues involved!
There may be a possibility that if someone gets malicious code into SVN trunk at any time, it'll be run on your machine. So if that's worrying, best to avoid setting up a 'bot.
The slave process should be kept up and running as much as possible; it's got to be a persistent daemon.
I'd recommend running as non-root, and not as your own userid. if a miscreant managed to get hostile code into SVN trunk, it'd pretty quickly get run on your machine by this code.
It's not *too* CPU hungry – but will kick off a compile and "make test" *every time* someone checks something into SpamAssassin svn! so if that puts you off, this isn't for you
so pretty much, overall, this requires that you have root on some box which has a 99%-uptime network connection to set a slave up.
Commands To Set Up a BuildBot Slave
Install Twisted 1.3.0. This step can be omitted if you already have it, or just use "sudo apt-get install twisted" if you're on debian unstable.
Note that you also need python 2.2 or later installed.
No Format |
---|
wget http://twistedmatrix.com/downloads/Twisted_NoDocs-1.3.0.tar.bz2
bunzip2 -cd < Twisted_NoDocs-1.3.0.tar.bz2 | tar xvf -
cd Twisted-1.3.0 ; sudo python setup.py install
cd ..
|
Next, install BuildBot itself:
No Format |
---|
wget http://internap.dl.sourceforge.net/sourceforge/buildbot/buildbot-0.6.1.tar.gz
tar xvfz buildbot-0.6.1.tar.gz
cd buildbot-0.6.1 ; sudo python setup.py install
|
And create a user account to run the slave as, then set up the slave:
No Format |
---|
sudo useradd -c "SpamAssassin Buildbot" buildbot
sudo su - buildbot
mkdir -p /home/buildbot/slaves
[now, you need the buildbot password. ask on the IRC channel
and one of the PMC should be able to set you up with one.
If you're a PMC member, take a look at /home/buildbot/README
on bugzilla.]
PASSWORD=[password]
[give your slave a good name, like "jm-debian-stable" or
"jm-ubuntu-hoary-perl585"]
HOST_OS="username-hostname-osname"
mkdir /home/buildbot/slaves/$HOST_OS
cd /home/buildbot/slaves/$HOST_OS
mktap buildbot slave --basedir /home/buildbot/slaves/$HOST_OS --master \
buildbot.spamassassin.org:9989 --name $HOST_OS \
--passwd $PASSWORD --usepty 0 --keepalive 300
|
(note: use "mktap" directly instead of "buildbot slave so you can set usepty and keepalive.) Mail dev/at/SpamAssassin.apache.org the $HOST_OS string you've chosen.
Command to start the slave process:
No Format |
---|
buildbot start /home/buildbot/slaves/$HOST_OS
|
to monitor slave progress/errors:
No Format |
---|
less /home/buildbot/slaves/$HOST_OS/twistd.log
|
to start at boot in future, add this line to crontab (on linux machines):
org/.
Due to politics with Oracle, the project formerly known as Hudson was renamed Jenkins in early 2011. http://jenkins-ci.org/content/hudsons-future
Therefore, the Jenkins/Hudson server for the SA Project has a bit of an identity crisis. This is evident in documentation, server names, existing scripts, etc. But the Jenkins CI server will run build/hudson/run_build (3.3 branch) or build/jenkins/run_build (trunk) to test the latest code after every check-in to SVN.
As of May 2011, there are jobs for both the 3.3 branch and trunk:
https://builds.apache.org/job/SpamAssassin-3.3.x/ https://builds.apache.org/job/SpamAssassin-trunk/
Both of these jobs run on the solaris1 slave and use the script in trunk under build/jenkins/run_build
There is also a test job we are using to prepare for the eventual replacement of the solaris1 zone for Jenkins.
https://builds.apache.org/job/SpamAssassin-trunk-FreeBSD/
This job runs on a freebsd slave and use the script in build/jenkins/run_build_freebsd
To login at http://builds.apache.org/, use your ASF LDAP credentials.
To administer the jobs, you must be a member of hudson-jobadmin group.
For more information, see http://wiki.apache.org/general/Jenkins which includes instructions for the PMC chair to grant access for a committer to get an administrative account.
The results can be viewed at the same links above for the jobs.
...