Merge lp:~frankban/charms/oneiric/buildbot-slave/tests into lp:~yellow/charms/oneiric/buildbot-slave/trunk

Proposed by Francesco Banconi
Status: Merged
Approved by: Graham Binns
Approved revision: 3
Merged at revision: 3
Proposed branch: lp:~frankban/charms/oneiric/buildbot-slave/tests
Merge into: lp:~yellow/charms/oneiric/buildbot-slave/trunk
Diff against target: 62 lines (+30/-5)
3 files modified
hooks/buildbot-relation-changed (+10/-2)
hooks/install (+19/-2)
revision (+1/-1)
To merge this branch: bzr merge lp:~frankban/charms/oneiric/buildbot-slave/tests
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+90846@code.launchpad.net

Description of the change

Buildslave directory is now created during charm installation (install hook) using localhost.
The tac file is then updated when a buildbot relation is established.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/buildbot-relation-changed'
--- hooks/buildbot-relation-changed 2012-01-30 19:09:50 +0000
+++ hooks/buildbot-relation-changed 2012-01-31 10:31:36 +0000
@@ -9,9 +9,17 @@
9PASSWD=`config-get passwd`9PASSWD=`config-get passwd`
10HOST=`relation-get private-address`10HOST=`relation-get private-address`
1111
12juju-log "--> create slave"12juju-log "--> stop"
13# The exit code is 0 even if the buildslave was not running.
14buildslave stop $BUILDBOT_DIR
15juju-log "<-- stop"
16
17juju-log "--> create .tac"
18if [ -e $BUILDBOT_DIR/buildbot.tac ]; then
19 rm $BUILDBOT_DIR/buildbot.tac
20fi
13buildslave create-slave $BUILDBOT_DIR $HOST $NAME $PASSWD21buildslave create-slave $BUILDBOT_DIR $HOST $NAME $PASSWD
14juju-log "<-- create slave"22juju-log "<-- create .tac"
1523
16juju-log "--> start"24juju-log "--> start"
17buildslave start $BUILDBOT_DIR25buildslave start $BUILDBOT_DIR
1826
=== modified file 'hooks/install'
--- hooks/install 2012-01-30 19:09:50 +0000
+++ hooks/install 2012-01-31 10:31:36 +0000
@@ -3,8 +3,25 @@
3# i.e. apt-get install -y foo or bzr branch http://myserver/mycode /srv/webroot3# i.e. apt-get install -y foo or bzr branch http://myserver/mycode /srv/webroot
4set -eux # -x for verbose logging to juju debug-log4set -eux # -x for verbose logging to juju debug-log
55
6juju-log "--> install"6juju-log "--> install packages"
7BUILDBOT_DIR=`config-get installdir`7BUILDBOT_DIR=`config-get installdir`
8apt-get install -y buildbot8apt-get install -y buildbot
9mkdir -p $BUILDBOT_DIR9mkdir -p $BUILDBOT_DIR
10juju-log "<-- install"10juju-log "<-- install packages"
11
12juju-log "--> create slave"
13NAME=`config-get name`
14PASSWD=`config-get passwd`
15
16# We set HOST to localhost for now because we can't get the actual host
17# until we're joined to the buildbot-master instance.
18HOST="localhost"
19
20juju-log "buildslave create-slave $BUILDBOT_DIR $HOST $NAME $PASSWD"
21buildslave create-slave $BUILDBOT_DIR $HOST $NAME $PASSWD
22juju-log "<-- create slave"
23
24# This is where we would set info/admin and info/host. Not sure what
25# is pertinent, but the default is a bit lame in the juju case.
26
27# This is where we would run something like setuplxc.
1128
=== modified file 'revision'
--- revision 2012-01-30 19:09:50 +0000
+++ revision 2012-01-31 10:31:36 +0000
@@ -1,1 +1,1 @@
118119

Subscribers

People subscribed via source and target branches