2019-06-29 09:45:35 +00:00
|
|
|
|
|
|
|
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
|
2019-06-29 12:15:57 +00:00
|
|
|
umask = 0o22
|
2019-06-29 09:45:35 +00:00
|
|
|
maxdelay = 300
|
|
|
|
numcpus = None
|
2022-07-13 16:29:08 +00:00
|
|
|
allow_shutdown = 'file'
|
2019-06-29 09:45:35 +00:00
|
|
|
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)
|