 Issue 29325436:
  Issue 1281 - Introduce module buildbot  (Closed)
    
  
    Issue 29325436:
  Issue 1281 - Introduce module buildbot  (Closed) 
  | Left: | ||
| Right: | 
| LEFT | RIGHT | 
|---|---|
| 1 # -*- python -*- | 1 # -*- python -*- | 
| 2 # ex: set syntax=python: | 2 # ex: set syntax=python: | 
| 3 <% require 'json' -%> | 3 <% require 'json' -%> | 
| 4 | 4 | 
| 5 # This is a sample buildmaster config file. It must be installed as | 5 # This is a sample buildmaster config file. It must be installed as | 
| 6 # 'master.cfg' in your buildmaster's base directory. | 6 # 'master.cfg' in your buildmaster's base directory. | 
| 7 | 7 | 
| 8 import buildbot.buildslave | 8 import buildbot.buildslave | 
| 9 import buildbot.status.html | 9 import buildbot.status.html | 
| 10 import buildbot.status.web.authz | 10 import buildbot.status.web.authz | 
| 11 | 11 | 
| 12 # This is the dictionary that the buildmaster pays attention to. | 12 # This is the dictionary that the buildmaster pays attention to. | 
| 13 # We also use a shorter alias to save typing. | 13 # We also use a shorter alias to save typing. | 
| 14 c = BuildmasterConfig = {} | 14 c = BuildmasterConfig = <%= @config.to_json %> | 
| 15 | 15 | 
| 16 ####### BUILDSLAVES | 16 ####### BUILDSLAVES | 
| 17 | 17 | 
| 18 # The 'slaves' list defines the set of recognized buildslaves. Each | 18 # The 'slaves' list defines the set of recognized buildslaves. Each | 
| 19 # element is a BuildSlave object, specifying a unique slave name and | 19 # element is a BuildSlave object, specifying a unique slave name and | 
| 20 # password. The same slave name and password must be configured on | 20 # password. The same slave name and password must be configured on | 
| 21 # the slave. | 21 # the slave. | 
| 22 | 22 | 
| 23 c['slaves'] = [ | 23 c['slaves'] = [ | 
| 24 # Puppet: $slaves where $master == localhost:9989 | 24 # Puppet: $slaves where $master == localhost:9989 | 
| 25 <% @slaves.sort.each do |name, record| -%> | 25 <% @slaves.sort.each do |name, record| -%> | 
| 26 <% default_master = "127.0.0.1:#{@port}" -%> | 26 <% default_master = "127.0.0.1:#{@port}" -%> | 
| 27 <% master = record.fetch('master', default_master) -%> | 27 <% master = record.fetch('master', default_master) -%> | 
| 28 <% if [default_master, "localhost:#{@port}"].include? master -%> | 28 <% if [default_master, "localhost:#{@port}"].include? master -%> | 
| 29 buildbot.buildslave.BuildSlave(<%= | 29 buildbot.buildslave.BuildSlave(<%= | 
| 30 name.to_s.to_json %>, <%= | 30 name.to_s.to_json %>, <%= | 
| 31 record.fetch('password', 'changeme').to_s.to_json %>), | 31 record.fetch('password', 'changeme').to_s.to_json %>), | 
| 32 <% end -%> | 32 <% end -%> | 
| 33 <% end -%> | 33 <% end -%> | 
| 34 # Puppet: $slots | 34 # Puppet: $slave_credentials | 
| 35 <% @slots.sort.each do |name,password| -%> | 35 <% @slave_credentials.sort.each do |name,password| -%> | 
| 36 buildbot.buildslave.BuildSlave(<%= | 36 buildbot.buildslave.BuildSlave(<%= | 
| 37 name.to_s.to_json %>, <%= | 37 name.to_s.to_json %>, <%= | 
| 38 password.to_s.to_json %>), | 38 password.to_s.to_json %>), | 
| 39 <% end -%> | 39 <% end -%> | 
| 40 ] | 40 ] | 
| 41 | 41 | 
| 42 # 'slavePortnum' defines the TCP port to listen on for connections | 42 # 'slavePortnum' defines the TCP port to listen on for connections | 
| 43 # from slaves. This must match the value configured into the buildslaves | 43 # from slaves. This must match the value configured into the buildslaves | 
| 44 # (with their --master option) | 44 # (with their --master option) | 
| 45 | 45 | 
| 46 c['slavePortnum'] = <%= @port.to_i %> | 46 c['slavePortnum'] = <%= @slave_port.to_i %> | 
| 47 | 47 | 
| 48 ####### CHANGESOURCES | 48 ####### CHANGESOURCES | 
| 49 | 49 | 
| 50 # the 'change_source' setting tells the buildmaster how it should | 50 # the 'change_source' setting tells the buildmaster how it should | 
| 51 # find out about source code changes. | 51 # find out about source code changes. | 
| 52 | 52 | 
| 53 c['change_source'] = [] | 53 c['change_source'] = [] | 
| 54 | 54 | 
| 55 # c['change_source'].append(buidlbot.changes.gitpoller.GitPoller( | 55 # c['change_source'].append(buidlbot.changes.gitpoller.GitPoller( | 
| 56 # 'git://github.com/buildbot/pyflakes.git', | 56 # 'git://github.com/buildbot/pyflakes.git', | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 ), | 104 ), | 
| 105 ), | 105 ), | 
| 106 ) | 106 ) | 
| 107 | 107 | 
| 108 ####### PROJECT IDENTITY | 108 ####### PROJECT IDENTITY | 
| 109 | 109 | 
| 110 # the 'title' string will appear at the top of this buildbot | 110 # the 'title' string will appear at the top of this buildbot | 
| 111 # installation's html.WebStatus home page (linked to the 'titleURL') | 111 # installation's html.WebStatus home page (linked to the 'titleURL') | 
| 112 # and is embedded in the title of the waterfall HTML page. | 112 # and is embedded in the title of the waterfall HTML page. | 
| 113 | 113 | 
| 114 c['title'] = <%= @project.fetch('title', 'Example').to_s.to_json %> | 114 c.setdefault('title', 'Example') | 
| 115 c['titleURL'] = <%= @project.fetch('url', 'http://example.com/').to_s.to_json %> | 115 c.setdefault('titleURL', 'http://example.com/') | 
| 
Felix Dahlke
2016/02/10 09:26:10
I suppose I'm missing something, but where are set
 
mathias
2016/02/10 10:30:45
Above, line 14; c = BuildmasterConfig = <%= @confi
 
Felix Dahlke
2016/02/10 11:54:40
Acknowledged.
 | |
| 116 | 116 | 
| 117 # the 'buildbotURL' string points to the location where the buildbot's | 117 # the 'buildbotURL' string points to the location where the buildbot's | 
| 118 # internal web server (usually the html.WebStatus page) is visible. This | 118 # internal web server (usually the html.WebStatus page) is visible. This | 
| 119 # typically uses the port number set in the Waterfall 'status' entry, | 119 # typically uses the port number set in the Waterfall 'status' entry, | 
| 120 # but with an externally-visible host name which the buildbot cannot | 120 # but with an externally-visible host name which the buildbot cannot | 
| 121 # figure out without some help. | 121 # figure out without some help. | 
| 122 | 122 | 
| 123 c['buildbotURL'] = 'http://localhost:<%= @http_port.to_i %>/' | 123 c.setdefault('buildbotURL', 'http://localhost:<%= @http_port.to_i %>/') | 
| 124 | 124 | 
| 125 ####### DB URL | 125 ####### DB URL | 
| 126 | 126 | 
| 127 # This specifies what database buildbot uses to store change and | 127 # This specifies what database buildbot uses to store change and | 
| 128 # scheduler state. Leave this at its default for all but maybe the | 128 # scheduler state. Leave this at its default for all but maybe the | 
| 129 # largest installations. | 129 # largest installations. | 
| 130 | 130 | 
| 131 c['db_url'] = <%= @database.to_s.to_json %> | 131 c['db_url'] = <%= @database.to_s.to_json %> | 
| 132 | 132 | 
| LEFT | RIGHT |