Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Mar 26th, 2012  |  syntax: None  |  size: 1.76 KB  |  hits: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from buildbot.buildslave import BuildSlave
  2. from buildbot.changes import filter
  3. from buildbot.changes.gitpoller import GitPoller
  4. from buildbot.config import BuilderConfig
  5. from buildbot.process.factory import BuildFactory
  6. from buildbot.schedulers.basic import SingleBranchScheduler
  7. from buildbot.schedulers.forcesched import ForceScheduler
  8. from buildbot.status import html
  9. from buildbot.status.web import authz, auth
  10. from buildbot.steps.shell import ShellCommand
  11. from buildbot.steps.source import Git
  12. from buildbot.steps.transfer import FileUpload, DirectoryUpload
  13.  
  14.  
  15. c = BuildmasterConfig = {}
  16.  
  17. c['slaves'] = [BuildSlave("example-slave", "pass")]
  18.  
  19. c['slavePortnum'] = 9989
  20.  
  21. c['change_source'] = []
  22. c['change_source'] = GitPoller('http://www.github.com/buildbot/buildbot.git')
  23.  
  24. c['schedulers'] = []
  25. c['schedulers'].append(ForceScheduler(
  26.                             name="force",
  27.                             builderNames=["upload"]))
  28.  
  29. factory = BuildFactory()
  30.  
  31. #factory.addStep(ShellCommand(command=['ls']))
  32. factory.addStep(FileUpload(slavesrc="file.txt", masterdest="file.txt"))
  33.  
  34.  
  35. c['builders'] = []
  36. c['builders'].append(
  37.     BuilderConfig(name="upload",
  38.       slavenames=["example-slave"],
  39.       factory=factory))
  40.  
  41. c['status'] = []
  42.  
  43. authz_cfg=authz.Authz(
  44.     gracefulShutdown = True,
  45.     forceBuild = True, # use this to test your slave once it is set up
  46.     forceAllBuilds = True,
  47.     pingBuilder = True,
  48.     stopBuild = True,
  49.     stopAllBuilds = True,
  50.     cancelPendingBuild = True,
  51. )
  52. c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
  53.  
  54. c['title'] = "Pyflakes"
  55. c['titleURL'] = "http://divmod.org/trac/wiki/DivmodPyflakes"
  56. c['buildbotURL'] = "http://localhost:8010/"
  57.  
  58. c['db'] = {
  59.     'db_url' : "sqlite:///state.sqlite",
  60. }