Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pierre Tardy
committed
Jun 27, 2016
1 parent
b6f0342
commit 09844c3
Showing
12 changed files
with
85 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ sandbox | |
wheelhouse | ||
dist | ||
slave/ | ||
master.cfg | ||
buildbot.tac | ||
cfg.yml | ||
run.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM buildbot/buildbot-master:master | ||
COPY example /usr/src/buildbot_travis/example | ||
|
||
RUN \ | ||
apk add --no-cache py-cffi py-requests docker-py@testing && \ | ||
pip install 'txrequests' 'pyjade' 'txgithub' 'ldap3' 'docker-py>=1.4' && \ | ||
pip install /usr/src/buildbot_travis/example/*.whl && \ | ||
rm -r /root/.cache | ||
|
||
WORKDIR /var/lib/buildbot | ||
VOLUME /var/lib/buildbot | ||
CMD ["/usr/src/buildbot_travis/example/start_buildbot.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include *.rst *.txt | ||
recursive-include buildbot_travis/status/templates/ *.html | ||
include buildbot_travis/VERSION | ||
recursive-include buildbot_travis/static * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# database parameters are shared between containers | ||
POSTGRES_PASSWORD=change_me | ||
POSTGRES_USER=buildbot | ||
POSTGRES_DB=buildbot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: '2' | ||
services: | ||
postgres: | ||
env_file: db.env | ||
image: "postgres:9.4" | ||
volumes: | ||
- /var/lib/buildbot_db:/var/lib/postgresql/data | ||
expose: | ||
- 5432 | ||
|
||
buildbot: | ||
# switch between local build and dockerhub image | ||
# build: ../ | ||
image: "buildbot/buildbot_travis" | ||
env_file: db.env | ||
ports: | ||
- "8010:8010" | ||
# for external non-docker workers, uncomment the following line | ||
- "9989:9989" | ||
expose: | ||
- 9989 | ||
depends_on: | ||
- postgres | ||
volumes: | ||
- /var/lib/buildbot_travis/:/var/lib/buildbot/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
from buildbot_travis import TravisConfigurator | ||
from buildbot.plugins import buildslave | ||
|
||
useDocker=False # by default | ||
debug=False | ||
c = BuildmasterConfig = {} | ||
c['slavePortnum'] = 19989 | ||
c['slaves'] = [ | ||
buildslave.BuildSlave('slave', 'pass'), | ||
] | ||
if useDocker: | ||
c['slaves'].extend([ | ||
buildslave.DockerLatentBuildSlave('docker%d' % (i,), 'pass', 'tcp://localhost:2375', | ||
util.Property("image", "slave"), followStartupLogs=debug) | ||
for i in range(10)]) | ||
|
||
TravisConfigurator(BuildmasterConfig, basedir, latentRunners=useDocker).fromDb() # or .fromYaml('cfg.yml') | ||
TravisConfigurator(BuildmasterConfig, basedir).fromDb() # or .fromYaml('cfg.yml') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
B=`pwd` | ||
if [ ! -f $B/buildbot.tac ] | ||
then | ||
buildbot create-master --db="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB" $B | ||
mv /usr/src/buildbot_travis/example/master.cfg $B/master.cfg | ||
cp /usr/src/buildbot_travis/example/buildbot.tac $B | ||
|
||
echo | ||
echo buildbot is now setup on the docker host in /var/lib/buildbot | ||
echo | ||
echo You can now edit the configuration file there to sweet your needs! | ||
echo | ||
echo | ||
fi | ||
# wait for pg to start by trying to upgrade the master | ||
for i in `seq 100` | ||
do | ||
buildbot upgrade-master $B && break | ||
sleep 1 | ||
done | ||
exec twistd -ny $B/buildbot.tac |