Hudson
Instalation
Basic setup
Mangage hudson
Plugins
Available
Check Green Balls, Setenv, and Mercurial Plugin
Install (and wait for success)
Restart
Mangage hudson
Configure system
Environment variables
DJANGO_SETTINGS_MODULE=nav.django.settings
PGHOST=navdevdb
PGUSER=navtest
PGPASSWORD=s3cret
CLASSPATH=/usr/share/java/libsnmp-1.4.jar
Make install job
./autogen.sh
./configure --prefix="$WORKSPACE/build"
make
make install
Create DB job
PGDATABASE=nav-$JOB_NAME
./tests/createdb-test.sh
Python tests build
PGDATABASE=nav-$JOB_NAME
./tests/bootstrap-test-environment.sh "$WORKSPACE/build"
source "$WORKSPACE/build/bin/activate"
cd "$WORKSPACE/build/lib/python/"
nosetests --with-xunit --verbose
Crawler / validation job
PGDATABASE=nav-$JOB_NAME
TARGETURL=https://elixis.uninett.no/
ADMINPASSWORD=s3cret
./tests/bootstrap-test-environment.sh "$WORKSPACE/build"
source "$WORKSPACE/build/bin/activate"
nosetests --with-xunit --verbose tests/crawler-test.py
Upgrade DB job
PGDATABASE=nav-$JOB_NAME
OTHER_URL=http://nav.uninett.no/hg/series/3.5.x/
OTHER_FOLDER=$WORKSPACE/3.5
UPGRADE_FILES=3.6.*.sql trunk.sql
test -d $OTHER_FOLDER && rm -rf $OTHER_FOLDER || true
hg clone $OTHER_URL $OTHER_FOLDER
cd $OTHER_FOLDER
hg update tip
../tests/createdb-test.sh
cd -
cd doc/sql/upgrades
for file in `eval echo $UPGRADE_FILES`; do
out=`mktemp`
psql -f $file 2>&1 | tee $out
retval=`grep ERROR $out | wc -l`
rm $out
test $retval -eq 0
done
Notification setup
Manage Hudson
Manage Plugins
Available
Select Hudson
IRC Plugin, Hudson instant-messaging plugin
Restart
Manage Hudson
Configure system
-
Hostname: chat.eu.freenode.net
Post: 6667
Channels: #navbuild
Nickname: navbuild
Prefix: !
Hudson username: navbuild
Hudson passwrod: s3cret
Manage Hudson
Manage Users
Create user
username: navbuild
password: s3cret
fullname: hudson irc bot
email: bot@example.com
For each job perform enable
IRC notification
Javascript Testing
apt-get install make python g++
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd `ls -rd node-v*`
./configure
make install
Future ideas