add worker
This commit is contained in:
parent
87dd56fc12
commit
8de56711b8
@ -1,2 +1,2 @@
|
|||||||
buildbot[bundle]==0.9.2
|
buildbot==0.8.14
|
||||||
psycopg2cffi-compat
|
psycopg2cffi-compat
|
||||||
|
2
pypy/worker/Dockerfile
Normal file
2
pypy/worker/Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from pypy:2-onbuild
|
||||||
|
CMD ["twistd", "-ny", "buildbot.tac"]
|
40
pypy/worker/buildbot.tac
Normal file
40
pypy/worker/buildbot.tac
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import fnmatch
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from twisted.application import service
|
||||||
|
from twisted.python.log import FileLogObserver
|
||||||
|
from twisted.python.log import ILogObserver
|
||||||
|
|
||||||
|
from buildslave.bot import BuildSlave
|
||||||
|
|
||||||
|
# setup worker
|
||||||
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
application = service.Application('buildbot-worker')
|
||||||
|
|
||||||
|
|
||||||
|
application.setComponent(ILogObserver, FileLogObserver(sys.stdout).emit)
|
||||||
|
# and worker on the same process!
|
||||||
|
buildmaster_host = os.environ.get("BUILDMASTER", 'localhost')
|
||||||
|
port = int(os.environ.get("BUILDMASTER_PORT", 9989))
|
||||||
|
workername = os.environ.get("WORKERNAME", 'docker')
|
||||||
|
passwd = os.environ.get("WORKERPASS")
|
||||||
|
|
||||||
|
# delete the password from the environ so that it is not leaked in the log
|
||||||
|
blacklist = os.environ.get("WORKER_ENVIRONMENT_BLACKLIST", "WORKERPASS").split()
|
||||||
|
for name in list(os.environ.keys()):
|
||||||
|
for toremove in blacklist:
|
||||||
|
if fnmatch.fnmatch(name, toremove):
|
||||||
|
del os.environ[name]
|
||||||
|
|
||||||
|
keepalive = 600
|
||||||
|
umask = None
|
||||||
|
maxdelay = 300
|
||||||
|
allow_shutdown = None
|
||||||
|
usepty=False
|
||||||
|
|
||||||
|
s = BuildSlave(buildmaster_host, port, workername, passwd, basedir,
|
||||||
|
keepalive, usepty, umask=umask, maxdelay=maxdelay,
|
||||||
|
allow_shutdown=allow_shutdown)
|
||||||
|
|
||||||
|
s.setServiceParent(application)
|
1
pypy/worker/requirements.txt
Normal file
1
pypy/worker/requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
buildbot-slave==0.8.14
|
Loading…
Reference in New Issue
Block a user