blob: 81e267186825cfeae6fc7f7b422cb2755d16dd82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/usr/bin/env bash
[ -n "$BUILDWORKER_NAME" ] || {
echo "Please supply a name via --env BUILDWORKER_NAME=XXX" >&2
exit 1
}
[ -n "$BUILDWORKER_PASSWORD" ] || {
echo "Please supply a password via --env BUILDWORKER_PASSWORD=XXX" >&2
exit 2
}
rm -f /builder/buildbot.tac
use_tls=""
[ "$BUILDWORKER_TLS" = 1 ] && use_tls="--use-tls"
/usr/local/bin/buildbot-worker create-worker --force --umask="0o22" $use_tls /builder \
"$BUILDWORKER_MASTER" "$BUILDWORKER_NAME" "$BUILDWORKER_PASSWORD"
if [ "$BUILDWORKER_TLS" = 1 ]; then
sed -i \
-e 's#(buildmaster_host, port, #(None, None, #' \
-e 's#allow_shutdown=allow_shutdown#&, connection_string="SSL:%s:%d" %(buildmaster_host, port)#' \
/builder/buildbot.tac
fi
echo "$BUILDWORKER_ADMIN" > /builder/info/admin
echo "$BUILDWORKER_DESCRIPTION" > /builder/info/host
unset BUILDWORKER_ADMIN BUILDWORKER_DESCRIPTION BUILDWORKER_MASTER BUILDWORKER_NAME BUILDWORKER_PASSWORD
rm -f /builder/twistd.pid
exec /usr/local/bin/buildbot-worker start --nodaemon /builder
|