mirror of
https://github.com/reactos/buildbot_config.git
synced 2024-11-23 11:49:50 +00:00
43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
|
|
import os
|
|
|
|
from buildbot_worker.bot import Worker
|
|
from twisted.application import service
|
|
|
|
basedir = '/srv/buildbot/worker_data'
|
|
rotateLength = 10000000
|
|
maxRotatedFiles = 10
|
|
|
|
# if this is a relocatable tac file, get the directory containing the TAC
|
|
if basedir == '.':
|
|
import os.path
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
# note: this line is matched against to check that this is a worker
|
|
# directory; do not edit it.
|
|
application = service.Application('buildbot-worker')
|
|
|
|
from twisted.python.logfile import LogFile
|
|
from twisted.python.log import ILogObserver, FileLogObserver
|
|
logfile = LogFile.fromFullPath(
|
|
os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
|
|
maxRotatedFiles=maxRotatedFiles)
|
|
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
|
|
|
|
buildmaster_host = 'build.reactos.org'
|
|
port = 9989
|
|
workername = 'WORKERNAME_HERE'
|
|
passwd = 'PASSWORD_HERE'
|
|
keepalive = 600
|
|
umask = 0o22
|
|
maxdelay = 300
|
|
numcpus = None
|
|
allow_shutdown = None
|
|
maxretries = None
|
|
|
|
s = Worker(buildmaster_host, port, workername, passwd, basedir,
|
|
keepalive, umask=umask, maxdelay=maxdelay,
|
|
numcpus=numcpus, allow_shutdown=allow_shutdown,
|
|
maxRetries=maxretries)
|
|
s.setServiceParent(application)
|