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

Proposed by Gary Poster on 2012-01-30
Status: Merged
Approved by: Gary Poster on 2012-01-30
Approved revision: 2
Merged at revision: 2
Proposed branch: lp:~gary/charms/oneiric/buildbot-slave/trunk
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:~gary/charms/oneiric/buildbot-slave/trunk
Reviewer Review Type Date Requested Status
Gary Poster (community) Approve on 2012-01-30
Review via email: mp+90764@code.launchpad.net

Description of the change

To post a comment you must log in.
Gary Poster (gary) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'config.yaml'
2--- config.yaml 1970-01-01 00:00:00 +0000
3+++ config.yaml 2012-01-30 19:13:27 +0000
4@@ -0,0 +1,17 @@
5+options:
6+ installdir:
7+ description: |
8+ The directory where the Buildbot slave will be installed.
9+ type: string
10+ default: /tmp/buildbot
11+ name:
12+ description: |
13+ The name of this slave.
14+ type: string
15+ default: example-slave
16+ passwd:
17+ description: |
18+ The password of this slave.
19+ type: string
20+ default: pass
21+
22
23=== added directory 'hooks'
24=== added file 'hooks/buildbot-relation-changed'
25--- hooks/buildbot-relation-changed 1970-01-01 00:00:00 +0000
26+++ hooks/buildbot-relation-changed 2012-01-30 19:13:27 +0000
27@@ -0,0 +1,18 @@
28+#!/bin/bash
29+# This must be renamed to the name of the relation. The goal here is to
30+# affect any change needed by relationships being formed, modified, or broken
31+# This script should be idempotent.
32+juju-log $JUJU_REMOTE_UNIT modified its settings
33+
34+BUILDBOT_DIR=`config-get installdir`
35+NAME=`config-get name`
36+PASSWD=`config-get passwd`
37+HOST=`relation-get private-address`
38+
39+juju-log "--> create slave"
40+buildslave create-slave $BUILDBOT_DIR $HOST $NAME $PASSWD
41+juju-log "<-- create slave"
42+
43+juju-log "--> start"
44+buildslave start $BUILDBOT_DIR
45+juju-log "<-- start"
46
47=== added file 'hooks/config-changed'
48--- hooks/config-changed 1970-01-01 00:00:00 +0000
49+++ hooks/config-changed 2012-01-30 19:13:27 +0000
50@@ -0,0 +1,2 @@
51+#!/bin/bash
52+# Hook for handling config changes.
53
54=== added file 'hooks/install'
55--- hooks/install 1970-01-01 00:00:00 +0000
56+++ hooks/install 2012-01-30 19:13:27 +0000
57@@ -0,0 +1,10 @@
58+#!/bin/bash
59+# Here do anything needed to install the service
60+# i.e. apt-get install -y foo or bzr branch http://myserver/mycode /srv/webroot
61+set -eux # -x for verbose logging to juju debug-log
62+
63+juju-log "--> install"
64+BUILDBOT_DIR=`config-get installdir`
65+apt-get install -y buildbot
66+mkdir -p $BUILDBOT_DIR
67+juju-log "<-- install"
68
69=== added file 'hooks/start'
70--- hooks/start 1970-01-01 00:00:00 +0000
71+++ hooks/start 2012-01-30 19:13:27 +0000
72@@ -0,0 +1,5 @@
73+#!/bin/bash
74+# Here put anything that is needed to start the service.
75+# Note that currently this is run directly after install
76+# i.e. 'service apache2 start'
77+
78
79=== added file 'hooks/stop'
80--- hooks/stop 1970-01-01 00:00:00 +0000
81+++ hooks/stop 2012-01-30 19:13:27 +0000
82@@ -0,0 +1,7 @@
83+#!/bin/bash
84+# This will be run when the service is being torn down, allowing you to disable
85+# it in various ways..
86+# For example, if your web app uses a text file to signal to the load balancer
87+# that it is live... you could remove it and sleep for a bit to allow the load
88+# balancer to stop sending traffic.
89+# rm /srv/webroot/server-live.txt && sleep 30
90
91=== added file 'metadata.yaml'
92--- metadata.yaml 1970-01-01 00:00:00 +0000
93+++ metadata.yaml 2012-01-30 19:13:27 +0000
94@@ -0,0 +1,21 @@
95+name: buildbot-slave
96+summary: system to automate the compile/test cycle
97+description: |
98+ The BuildBot is a system to automate the compile/test cycle required by
99+ most software projects to validate code changes. By automatically
100+ rebuilding and testing the tree each time something has changed, build
101+ problems are pinpointed quickly, before other developers are
102+ inconvenienced by the failure. The guilty developer can be identified
103+ and harassed without human intervention. By running the builds on a
104+ variety of platforms, developers who do not have the facilities to
105+ test their changes everywhere before checkin will at least know
106+ shortly afterwards whether they have broken the build or not. Warning
107+ counts, lint checks, image size, compile time, and other build
108+ parameters can be tracked over time, are more visible, and are
109+ therefore easier to improve.
110+requires:
111+ buildbot:
112+ interface: master
113+provides:
114+ buildbot:
115+ interface: slave
116
117=== added file 'revision'
118--- revision 1970-01-01 00:00:00 +0000
119+++ revision 2012-01-30 19:13:27 +0000
120@@ -0,0 +1,1 @@
121+18

Subscribers

People subscribed via source and target branches

to all changes: