Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

108 wiersze
4.0KB

  1. # -*- python -*-
  2. # ex: set filetype=python:
  3. from buildbot.plugins import *
  4. # This is a sample buildmaster config file. It must be installed as
  5. # 'master.cfg' in your buildmaster's base directory.
  6. # This is the dictionary that the buildmaster pays attention to. We also use
  7. # a shorter alias to save typing.
  8. c = BuildmasterConfig = {}
  9. ####### WORKERS
  10. # The 'workers' list defines the set of recognized workers. Each element is
  11. # a Worker object, specifying a unique worker name and password. The same
  12. # worker name and password must be configured on the worker.
  13. c['workers'] = [worker.LocalWorker("example-worker")]
  14. # 'protocols' contains information about protocols which master will use for
  15. # communicating with workers. You must define at least 'port' option that workers
  16. # could connect to your master with this protocol.
  17. # 'port' must match the value configured into the workers (with their
  18. # --master option)
  19. c['protocols'] = {'pb': {'port': 9989}}
  20. ####### CHANGESOURCES
  21. # the 'change_source' setting tells the buildmaster how it should find out
  22. # about source code changes. Here we point to the buildbot version of a python hello-world project.
  23. c['change_source'] = []
  24. c['change_source'].append(changes.GitPoller(
  25. 'git://github.com/buildbot/hello-world.git',
  26. workdir='gitpoller-workdir', branch='master',
  27. pollInterval=300))
  28. ####### SCHEDULERS
  29. # Configure the Schedulers, which decide how to react to incoming changes. In this
  30. # case, just kick off a 'runtests' build
  31. c['schedulers'] = []
  32. c['schedulers'].append(schedulers.SingleBranchScheduler(
  33. name="all",
  34. change_filter=util.ChangeFilter(branch='master'),
  35. treeStableTimer=None,
  36. builderNames=["runtests"]))
  37. c['schedulers'].append(schedulers.ForceScheduler(
  38. name="force",
  39. builderNames=["runtests"]))
  40. ####### BUILDERS
  41. # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
  42. # what steps, and which workers can execute them. Note that any particular build will
  43. # only take place on one worker.
  44. factory = util.BuildFactory()
  45. # check out the source
  46. factory.addStep(steps.Git(repourl='git://github.com/buildbot/hello-world.git', mode='incremental'))
  47. # run the tests (note that this will require that 'trial' is installed)
  48. factory.addStep(steps.ShellCommand(command=["trial", "hello"],
  49. env={"PYTHONPATH": "."}))
  50. c['builders'] = []
  51. c['builders'].append(
  52. util.BuilderConfig(name="runtests",
  53. workernames=["example-worker"],
  54. factory=factory))
  55. ####### BUILDBOT SERVICES
  56. # 'services' is a list of BuildbotService items like reporter targets. The
  57. # status of each build will be pushed to these targets. buildbot/reporters/*.py
  58. # has a variety to choose from, like IRC bots.
  59. c['services'] = []
  60. ####### PROJECT IDENTITY
  61. # the 'title' string will appear at the top of this buildbot installation's
  62. # home pages (linked to the 'titleURL').
  63. c['title'] = "Hello World CI"
  64. c['titleURL'] = "https://buildbot.github.io/hello-world/"
  65. # the 'buildbotURL' string should point to the location where the buildbot's
  66. # internal web server is visible. This typically uses the port number set in
  67. # the 'www' entry below, but with an externally-visible host name which the
  68. # buildbot cannot figure out without some help.
  69. c['buildbotURL'] = "http://localhost:8010/"
  70. # minimalistic config to activate new web UI
  71. c['www'] = dict(port=8010,
  72. plugins=dict(waterfall_view={}, console_view={}, grid_view={}))
  73. ####### DB URL
  74. c['db'] = {
  75. # This specifies what database buildbot uses to store its state.
  76. # It's easy to start with sqlite, but it's recommended to switch to a dedicated
  77. # database, such as PostgreSQL or MySQL, for use in production environments.
  78. # http://docs.buildbot.net/current/manual/configuration/global.html#database-specification
  79. 'db_url' : "{{buildbot_database_url}}",
  80. }