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

Proposed by Francesco Banconi
Status: Approved
Approved by: Gary Poster
Approved revision: 10
Proposed branch: lp:~frankban/charms/oneiric/buildbot-slave/initial
Merge into: lp:~yellow/charms/oneiric/buildbot-slave/trunk
Diff against target: 121 lines (+81/-0)
8 files modified
config.yaml (+17/-0)
hooks/buildbot-relation-changed (+18/-0)
hooks/config-changed (+2/-0)
hooks/install (+10/-0)
hooks/start (+5/-0)
hooks/stop (+7/-0)
metadata.yaml (+21/-0)
revision (+1/-0)
To merge this branch: bzr merge lp:~frankban/charms/oneiric/buildbot-slave/initial
Reviewer Review Type Date Requested Status
Gary Poster (community) Approve
Review via email: mp+90739@code.launchpad.net

Description of the change

Fisr working implementation of the buildbot slave charm.

To post a comment you must log in.
8. By Francesco Banconi

Cleaned old stuff coming from the master charm.

9. By Francesco Banconi

Cleaned config-changed file.

10. By Francesco Banconi

Cleaned install hook.

Revision history for this message
Gary Poster (gary) wrote :

Thank you for cleaning out the unnecessary master changes as we discussed on a hangout.

hooks/buildbot-relation-changed will be idempotent after we move the installation to the install step, so I won't worry about that.

review: Approve

Unmerged revisions

10. By Francesco Banconi

Cleaned install hook.

9. By Francesco Banconi

Cleaned config-changed file.

8. By Francesco Banconi

Cleaned old stuff coming from the master charm.

7. By Francesco Banconi

First working implementation of buildbot slave.

6. By Graham Binns

Basic tweaks from Master config.

5. By Brad Crittenden

make user and pkey optional when pulling from a public url

4. By Brad Crittenden

Incomplete work towards config directory checkout

3. By Brad Crittenden

Works against LXC

2. By Brad Crittenden

Fix expose

1. By Brad Crittenden

Almost working buildbot master charm

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'config.yaml'
--- config.yaml 1970-01-01 00:00:00 +0000
+++ config.yaml 2012-01-30 17:55:27 +0000
@@ -0,0 +1,17 @@
1options:
2 installdir:
3 description: |
4 The directory where the Buildbot slave will be installed.
5 type: string
6 default: /tmp/buildbot
7 name:
8 description: |
9 The name of this slave.
10 type: string
11 default: example-slave
12 passwd:
13 description: |
14 The password of this slave.
15 type: string
16 default: pass
17
018
=== added directory 'hooks'
=== added file 'hooks/buildbot-relation-changed'
--- hooks/buildbot-relation-changed 1970-01-01 00:00:00 +0000
+++ hooks/buildbot-relation-changed 2012-01-30 17:55:27 +0000
@@ -0,0 +1,18 @@
1#!/bin/bash
2# This must be renamed to the name of the relation. The goal here is to
3# affect any change needed by relationships being formed, modified, or broken
4# This script should be idempotent.
5juju-log $JUJU_REMOTE_UNIT modified its settings
6
7BUILDBOT_DIR=`config-get installdir`
8NAME=`config-get name`
9PASSWD=`config-get passwd`
10HOST=`relation-get private-address`
11
12juju-log "--> create slave"
13buildslave create-slave $BUILDBOT_DIR $HOST $NAME $PASSWD
14juju-log "<-- create slave"
15
16juju-log "--> start"
17buildslave start $BUILDBOT_DIR
18juju-log "<-- start"
019
=== added file 'hooks/config-changed'
--- hooks/config-changed 1970-01-01 00:00:00 +0000
+++ hooks/config-changed 2012-01-30 17:55:27 +0000
@@ -0,0 +1,2 @@
1#!/bin/bash
2# Hook for handling config changes.
03
=== added file 'hooks/install'
--- hooks/install 1970-01-01 00:00:00 +0000
+++ hooks/install 2012-01-30 17:55:27 +0000
@@ -0,0 +1,10 @@
1#!/bin/bash
2# Here do anything needed to install the service
3# i.e. apt-get install -y foo or bzr branch http://myserver/mycode /srv/webroot
4set -eux # -x for verbose logging to juju debug-log
5
6juju-log "--> install"
7BUILDBOT_DIR=`config-get installdir`
8apt-get install -y buildbot
9mkdir -p $BUILDBOT_DIR
10juju-log "<-- install"
011
=== added file 'hooks/start'
--- hooks/start 1970-01-01 00:00:00 +0000
+++ hooks/start 2012-01-30 17:55:27 +0000
@@ -0,0 +1,5 @@
1#!/bin/bash
2# Here put anything that is needed to start the service.
3# Note that currently this is run directly after install
4# i.e. 'service apache2 start'
5
06
=== added file 'hooks/stop'
--- hooks/stop 1970-01-01 00:00:00 +0000
+++ hooks/stop 2012-01-30 17:55:27 +0000
@@ -0,0 +1,7 @@
1#!/bin/bash
2# This will be run when the service is being torn down, allowing you to disable
3# it in various ways..
4# For example, if your web app uses a text file to signal to the load balancer
5# that it is live... you could remove it and sleep for a bit to allow the load
6# balancer to stop sending traffic.
7# rm /srv/webroot/server-live.txt && sleep 30
08
=== added file 'metadata.yaml'
--- metadata.yaml 1970-01-01 00:00:00 +0000
+++ metadata.yaml 2012-01-30 17:55:27 +0000
@@ -0,0 +1,21 @@
1name: buildbot-slave
2summary: system to automate the compile/test cycle
3description: |
4 The BuildBot is a system to automate the compile/test cycle required by
5 most software projects to validate code changes. By automatically
6 rebuilding and testing the tree each time something has changed, build
7 problems are pinpointed quickly, before other developers are
8 inconvenienced by the failure. The guilty developer can be identified
9 and harassed without human intervention. By running the builds on a
10 variety of platforms, developers who do not have the facilities to
11 test their changes everywhere before checkin will at least know
12 shortly afterwards whether they have broken the build or not. Warning
13 counts, lint checks, image size, compile time, and other build
14 parameters can be tracked over time, are more visible, and are
15 therefore easier to improve.
16requires:
17 buildbot:
18 interface: master
19provides:
20 buildbot:
21 interface: slave
022
=== added file 'revision'
--- revision 1970-01-01 00:00:00 +0000
+++ revision 2012-01-30 17:55:27 +0000
@@ -0,0 +1,1 @@
118

Subscribers

People subscribed via source and target branches