 Issue 29325436:
  Issue 1281 - Introduce module buildbot  (Closed)
    
  
    Issue 29325436:
  Issue 1281 - Introduce module buildbot  (Closed) 
  | Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 # == Class: adblockplus::buildmaster | |
| 2 # | |
| 3 # An authoritative build-server setup based on Buildbot and Nginx. | |
| 4 # | |
| 5 # === Parameters: | |
| 6 # | |
| 7 # [*domain*] | |
| 8 # The domain name associated with the Buildbot waterfall page. | |
| 9 # | |
| 10 # [*is_default_domain*] | |
| 11 # Whether the Buildbot page should serve as the default content | |
| 12 # handler with the HTTP server setup. | |
| 13 # | |
| 14 # [*project*] | |
| 15 # A hash to optionally contain a 'title' and 'url' for the project; | |
| 16 # translats directly into the $buildbot::master::project option. | |
| 
Felix Dahlke
2015/11/19 19:50:00
Typo: "translats"
 
mathias
2016/01/20 16:13:51
Acknowledged.
 | |
| 17 # | |
| 18 # [*ssl_cert*] | |
| 19 # The SSL certificate file name within the private module, if any. | |
| 20 # Requires an $ssl_key to be provided as well. | |
| 21 # | |
| 22 # [*ssl_key*] | |
| 23 # The SSL key file name within the private module, if any. | |
| 24 # Requires an $ssl_cert to be provided as well. | |
| 25 # | |
| 26 # [*slaves*] | |
| 27 # Local buildbot::slave records to setup with the master. | |
| 28 # | |
| 29 # [*slave_credentials*] | |
| 30 # Name => password pairs of e.g. remote build slaves. | |
| 
Felix Dahlke
2015/11/19 19:50:01
Why "e.g.", do we need credentials for local slave
 
mathias
2016/01/20 16:13:51
Yes.
 | |
| 31 # | |
| 32 # === Examples: | |
| 33 # | |
| 34 # class {'adblockplus::buildmaster': | |
| 35 # domain => 'localhost', | |
| 36 # is_default_domain => true, | |
| 37 # } | |
| 38 # | |
| 39 class adblockplus::buildmaster ( | |
| 40 $domain, | |
| 41 $is_default_domain = false, | |
| 42 $project = {}, | |
| 43 $ssl_cert = hiera('adblockplus::buildmaster::ssl_cert', 'undef'), | |
| 44 $ssl_key = hiera('adblockplus::buildmaster::ssl_key', 'undef'), | |
| 45 $slaves = hiera('adblockplus::buildmaster::slaves', {}), | |
| 46 $slave_credentials = hiera('adblockplus::buildmaster::slave_credentials', {}), | |
| 47 ) { | |
| 48 | |
| 49 include nginx | |
| 50 | |
| 51 # change default behavior, but still recognize hiera values | |
| 52 class {'buildbot': | |
| 53 master_service => hiera('buildbot::master_service', 'running'), | |
| 54 slave_service => hiera('buildbot::slave_service', 'running'), | |
| 55 } | |
| 56 | |
| 57 buildbot::master {'default': | |
| 58 project => $project, | |
| 59 slaves => $slaves, | |
| 60 slave_credentials => $slave_credentials, | |
| 61 system => true, | |
| 62 } | |
| 63 | |
| 64 buildbot::fragment {'custom': | |
| 65 authority => Buildbot::Master['default'], | |
| 66 content => template('adblockplus/buildmaster.erb'), | |
| 67 } | |
| 68 | |
| 69 nginx::hostconfig {$domain: | |
| 70 certificate => $ssl_cert ? { | |
| 71 'undef' => undef, | |
| 72 default => $ssl_cert, | |
| 73 }, | |
| 74 source => 'puppet:///modules/adblockplus/nginx/buildmaster.conf', | |
| 75 is_default => $is_default_domain, | |
| 76 log => 'access_log_buildbot', | |
| 77 private_key => $ssl_key ? { | |
| 78 'undef' => undef, | |
| 79 default => $ssl_key, | |
| 80 }, | |
| 81 } | |
| 82 } | |
| OLD | NEW |