OLD | NEW |
(Empty) | |
| 1 # == Type: buildbot::fragment |
| 2 # |
| 3 # Manage Buildbot (https://buildbot.net/) master configuration fragments. |
| 4 # |
| 5 # === Parameters: |
| 6 # |
| 7 # [*authority*] |
| 8 # The master instance to append the configuration fragment to. |
| 9 # |
| 10 # [*content*] |
| 11 # The configuration fragment's content. Mutually exclusive with $source. |
| 12 # |
| 13 # [*order*] |
| 14 # An indicator for concat::fragment ordering. |
| 15 # |
| 16 # [*source*] |
| 17 # The configuration fragment's content. Defaults to $title. Mutually |
| 18 # exclusive with $content. |
| 19 # |
| 20 # === Examples: |
| 21 # |
| 22 # buildbot::fragment { |
| 23 # authority => Buildbot::Master['example'], |
| 24 # content => "# additional python code for master.cfg", |
| 25 # } |
| 26 # |
| 27 define buildbot::fragment( |
| 28 $authority, |
| 29 $content = '', |
| 30 $order = 50, |
| 31 $source = '', |
| 32 ) { |
| 33 |
| 34 $master = getparam($authority, 'title') |
| 35 $basedir = getparam($authority, 'basedir') |
| 36 $config = "$basedir/master.cfg" |
| 37 |
| 38 realize(Concat[$config]) |
| 39 realize(Concat::Fragment[$config]) |
| 40 |
| 41 concat::fragment {"buildbot::fragment#$title": |
| 42 content => $content, |
| 43 order => $order, |
| 44 source => "$content$source" ? { |
| 45 '' => $title, |
| 46 default => $source, |
| 47 }, |
| 48 target => $config, |
| 49 } |
| 50 } |
OLD | NEW |