You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
4.3KB

  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'] = [
  14. worker.LocalWorker("local-worker",max_builds=1)
  15. ]
  16. # 'protocols' contains information about protocols which master will use for
  17. # communicating with workers. You must define at least 'port' option that workers
  18. # could connect to your master with this protocol.
  19. # 'port' must match the value configured into the workers (with their
  20. # --master option)
  21. c['protocols'] = {'pb': {'port': 9989}}
  22. ####### CHANGESOURCES
  23. # the 'change_source' setting tells the buildmaster how it should find out
  24. # about source code changes. Here we point to the buildbot version of a python hello-world project.
  25. c['change_source'] = []
  26. #c['change_source'].append(changes.GitPoller(
  27. # 'git://github.com/buildbot/hello-world.git',
  28. # workdir='gitpoller-workdir', branch='master',
  29. # pollInterval=300))
  30. ####### SCHEDULERS
  31. # Configure the Schedulers, which decide how to react to incoming changes. In this
  32. # case, just kick off a 'runtests' build
  33. c['schedulers'] = []
  34. c['schedulers'].append(schedulers.SingleBranchScheduler(
  35. name="all",
  36. change_filter=util.ChangeFilter(branch='master'),
  37. treeStableTimer=None,
  38. builderNames={{buildbot_builders.keys()}}))
  39. c['schedulers'].append(schedulers.ForceScheduler(
  40. name="force",
  41. builderNames={{buildbot_builders.keys()}}))
  42. ####### BUILDERS
  43. # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
  44. # what steps, and which workers can execute them. Note that any particular build will
  45. # only take place on one worker.
  46. c['builders'] = []
  47. {% for builder_name in buildbot_builders.keys() %}
  48. {% set builder = buildbot_builders[builder_name] %}
  49. factory = util.BuildFactory()
  50. {% for repo in builder.repos %}
  51. factory.addStep(steps.GitHub(
  52. name='{{repo.name}}',
  53. repourl='{{repo.repourl}}',
  54. mode='incremental',
  55. workdir='{{repo.workdir}}',
  56. alwaysUseLatest=True,
  57. ))
  58. {% endfor %}
  59. {% for cmd in builder.shell_commands %}
  60. factory.addStep(steps.ShellCommand(
  61. name='{{cmd.name}}',
  62. command='{{cmd.command}}',
  63. workdir='{{cmd.workdir}}',
  64. ))
  65. {% endfor %}
  66. c['builders'].append(
  67. util.BuilderConfig(
  68. name="{{builder_name}}",
  69. workernames=["local-worker"],
  70. factory=factory
  71. )
  72. )
  73. {% endfor %}
  74. ####### BUILDBOT SERVICES
  75. # 'services' is a list of BuildbotService items like reporter targets. The
  76. # status of each build will be pushed to these targets. buildbot/reporters/*.py
  77. # has a variety to choose from, like IRC bots.
  78. c['services'] = []
  79. ####### PROJECT IDENTITY
  80. # the 'title' string will appear at the top of this buildbot installation's
  81. # home pages (linked to the 'titleURL').
  82. c['title'] = "covid-videoplattform CICD"
  83. c['titleURL'] = "https://github.com/covid-videoplattform"
  84. # the 'buildbotURL' string should point to the location where the buildbot's
  85. # internal web server is visible. This typically uses the port number set in
  86. # the 'www' entry below, but with an externally-visible host name which the
  87. # buildbot cannot figure out without some help.
  88. c['buildbotURL'] = "https://{{buildbot_server_name}}/"
  89. # minimalistic config to activate new web UI
  90. c['www'] = dict(
  91. port=8010,
  92. plugins = dict(
  93. waterfall_view={},
  94. console_view={},
  95. grid_view={}
  96. ),
  97. change_hook_dialects={
  98. 'github': {}
  99. },
  100. )
  101. ####### DB URL
  102. c['db'] = {
  103. # This specifies what database buildbot uses to store its state.
  104. # It's easy to start with sqlite, but it's recommended to switch to a dedicated
  105. # database, such as PostgreSQL or MySQL, for use in production environments.
  106. # http://docs.buildbot.net/current/manual/configuration/global.html#database-specification
  107. 'db_url' : "{{buildbot_database_url}}",
  108. }