This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
devel:hudson [2010/07/08 13:11] thomaska Update irc settings |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Hudson ====== | ||
- | |||
- | ===== Instalation ===== | ||
- | |||
- | * Install deb for hudson | ||
- | * chmod +rx /var/lib/hudson (to allow apache access) | ||
- | * Goto host:8080 | ||
- | |||
- | ===== Basic setup ===== | ||
- | |||
- | * Mangage hudson | ||
- | * Plugins | ||
- | * Installed | ||
- | * Remove all installed plugins | ||
- | * Restart | ||
- | |||
- | * 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 | ||
- | |||
- | ===== Create DB job ===== | ||
- | |||
- | * New Job | ||
- | * Name: createdb, Type: freestyle | ||
- | * SCM: mercurial repo: http://metanav.uninett.no/hg/series/3.6.x/ branch: 3.6.x | ||
- | * Build Triggers: Poll SCM schedule: * * * * * | ||
- | * Build env: | ||
- | |||
- | PGDATABASE=nav-$JOB_NAME | ||
- | |||
- | * Build: Execute shell | ||
- | |||
- | ./version.sh | ||
- | ./tests/createdb-test.sh | ||
- | |||
- | * Test build | ||
- | |||
- | ===== Make install job ===== | ||
- | |||
- | * New Job | ||
- | * Name: make-install, Type: freestyle | ||
- | * SCM: mercurial repo: http://metanav.uninett.no/hg/series/3.6.x/ branch: 3.6.x | ||
- | * Build Triggers: Poll SCM schedule: * * * * * | ||
- | * Build: Execute shell | ||
- | |||
- | ./autogen.sh | ||
- | ./configure --prefix="$WORKSPACE/build" | ||
- | make | ||
- | make install | ||
- | |||
- | * Test build | ||
- | |||
- | ===== Python tests build ===== | ||
- | |||
- | * New Job | ||
- | * Name: python-tests, Type: freestyle | ||
- | * SCM: mercurial repo: http://metanav.uninett.no/hg/series/3.6.x/ branch: 3.6.x | ||
- | * Build Triggers: After other: make-install, createdb | ||
- | * Build env: | ||
- | |||
- | PGDATABASE=nav-$JOB_NAME | ||
- | |||
- | * Build: Execute shell | ||
- | |||
- | ./tests/bootstrap-test-environment.sh "$WORKSPACE/build" | ||
- | source "$WORKSPACE/build/bin/activate" | ||
- | cd "$WORKSPACE/build/lib/python/" | ||
- | nosetests --with-xunit --verbose | ||
- | |||
- | * Post build: Publish JUnit: <nowiki>**/nosetests.xml</nowiki> | ||
- | * Test build | ||
- | |||
- | ===== Crawler / validation job ===== | ||
- | |||
- | * New Job | ||
- | * Name: crawler-tests, Copy: python-tests | ||
- | * Build Triggers: Poll SCM schedule: * * * * * | ||
- | * Build env: | ||
- | |||
- | PGDATABASE=nav-$JOB_NAME | ||
- | TARGETURL=https://elixis.uninett.no/ | ||
- | ADMINPASSWORD=s3cret | ||
- | |||
- | * Build: Execute shell: | ||
- | |||
- | ./tests/bootstrap-test-environment.sh "$WORKSPACE/build" | ||
- | source "$WORKSPACE/build/bin/activate" | ||
- | nosetests --with-xunit --verbose tests/crawler-test.py | ||
- | |||
- | * Post build: Publish JUnit: <nowiki>**/nosetests.xml</nowiki> | ||
- | * Setup apache | ||
- | * Test build | ||
- | |||
- | ===== Upgrade DB job ===== | ||
- | |||
- | * New Job | ||
- | * Name: upgradedb, Type: freestyle | ||
- | * SCM: mercurial repo: http://metanav.uninett.no/hg/series/3.6.x/ branch: 3.6.x | ||
- | * Build Triggers: After other: createdb | ||
- | * Build env: | ||
- | |||
- | PGDATABASE=nav-$JOB_NAME | ||
- | OTHER_URL=http://metanav.uninett.no/hg/series/3.5.x/ | ||
- | OTHER_FOLDER=$WORKSPACE/3.5 | ||
- | UPGRADE_FILES=3.6.*.sql trunk.sql | ||
- | |||
- | * Build: Execute shell: | ||
- | |||
- | ./version.sh | ||
- | 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 | ||
- | |||
- | * Test build | ||
- | |||
- | ===== Notification setup ===== | ||
- | |||
- | * Manage Hudson | ||
- | * Manage Plugins | ||
- | * Available | ||
- | * Select Hudson IRC Plugin, Hudson instant-messaging plugin | ||
- | * Restart | ||
- | |||
- | * Manage Hudson | ||
- | * Configure system | ||
- | * Enable IRC Notfication | ||
- | |||
- | Hostname: chat.eu.freenode.net | ||
- | Post: 6667 | ||
- | Channels: #navbuild | ||
- | Nickname: navbuild | ||
- | Prefix: ! | ||
- | Hudson username: navbuild | ||
- | Hudson passwrod: s3cret | ||
- | |||
- | * Save | ||
- | |||
- | * Manage Hudson | ||
- | * Manage Users | ||
- | * Create user | ||
- | |||
- | username: navbuild | ||
- | password: s3cret | ||
- | fullname: hudson irc bot | ||
- | email: bot@example.com | ||
- | |||
- | * create user | ||
- | |||
- | * For each job perform enable IRC notification | ||
- | |||
- | * Restart | ||
- | * Test | ||
- | |||
- | ===== Future ideas ===== | ||
- | |||
- | * Hudson is currently only track adamcik/testing as this branch has the required helpers, so as soon as this lands in default/3.6.x Hudson should be updated to follow the correct repo. | ||
- | * Use LDAP for auth | ||
- | * Use metanav.uninett.no/hudson as proxy (with SSL?) | ||
- | * Perform schema diff of upgraded DB | ||
- | * Integrate new createdb script once written | ||
- | |||