/ cpp-ethereum-buildslave / buildbot.tac.sample
buildbot.tac.sample
 1  
 2  import os
 3  
 4  from buildslave.bot import BuildSlave
 5  from twisted.application import service
 6  
 7  basedir = '.'
 8  rotateLength = 512000
 9  maxRotatedFiles = 3
10  
11  # if this is a relocatable tac file, get the directory containing the TAC
12  if basedir == '.':
13      import os.path
14      basedir = os.path.abspath(os.path.dirname(__file__))
15  
16  # note: this line is matched against to check that this is a buildslave
17  # directory; do not edit it.
18  application = service.Application('buildslave')
19  
20  try:
21    from twisted.python.logfile import LogFile
22    from twisted.python.log import ILogObserver, FileLogObserver
23    logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
24                                   maxRotatedFiles=maxRotatedFiles)
25    application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
26  except ImportError:
27    # probably not yet twisted 8.2.0 and beyond, can't set log yet
28    pass
29  
30  buildmaster_host = 'build.ethdev.com'
31  port = 9989
32  slavename = 'dockerslave'
33  passwd = 'pass'
34  keepalive = 600
35  usepty = 0
36  umask = None
37  maxdelay = 300
38  allow_shutdown = None
39  
40  s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
41                 keepalive, usepty, umask=umask, maxdelay=maxdelay,
42                 allow_shutdown=allow_shutdown)
43  s.setServiceParent(application)
44