diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:06:28 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:06:28 +0000 |
commit | 02004ba83701a19037e175e6b623d25ebb61f72a (patch) | |
tree | cb5ea9b4716aaf71b345329cb9765b16206ec8d6 | |
parent | 14f898ccf52e939055124855d465b11ca502b33b (diff) | |
download | puppet-02004ba83701a19037e175e6b623d25ebb61f72a.tar puppet-02004ba83701a19037e175e6b623d25ebb61f72a.tar.gz puppet-02004ba83701a19037e175e6b623d25ebb61f72a.tar.bz2 puppet-02004ba83701a19037e175e6b623d25ebb61f72a.tar.xz puppet-02004ba83701a19037e175e6b623d25ebb61f72a.zip |
buildsystem: add build_nodes parameter
Add build_nodes parameter in buildsystem::var::scheduler. This parameter
is a hash containing the build nodes available indexed by architecture.
-rw-r--r-- | deployment/mga_buildsystem/manifests/config.pp | 4 | ||||
-rw-r--r-- | modules/buildsystem/manifests/var/scheduler.pp | 5 | ||||
-rw-r--r-- | modules/buildsystem/templates/upload.conf | 12 |
3 files changed, 18 insertions, 3 deletions
diff --git a/deployment/mga_buildsystem/manifests/config.pp b/deployment/mga_buildsystem/manifests/config.pp index ade1cb92..cc586de8 100644 --- a/deployment/mga_buildsystem/manifests/config.pp +++ b/deployment/mga_buildsystem/manifests/config.pp @@ -10,6 +10,10 @@ class mga_buildsystem::config { class { 'buildsystem::var::scheduler' : admin_mail => 'mageia-sysadm@mageia.org', + build_nodes => { + 'i586' => [ 'jonund0', 'ecosse0', 'jonund1', 'ecosse1' ], + 'x86_64' => [ 'ecosse0', 'jonund0', 'ecosse1', 'jonund1' ], + }, } include buildsystem::var::repository class { 'buildsystem::var::youri': diff --git a/modules/buildsystem/manifests/var/scheduler.pp b/modules/buildsystem/manifests/var/scheduler.pp index a6b9ef4f..d69c66fc 100644 --- a/modules/buildsystem/manifests/var/scheduler.pp +++ b/modules/buildsystem/manifests/var/scheduler.pp @@ -1,8 +1,11 @@ # $admin_mail: # the email address from which the build failure notifications # will be sent +# $build_nodes: +# a hash containing available build nodes indexed by architecture class buildsystem::var::scheduler( - $admin_mail = "root@${::domain}" + $admin_mail = "root@${::domain}", + $build_nodes ){ $login = 'schedbot' $homedir = "/var/lib/$login" diff --git a/modules/buildsystem/templates/upload.conf b/modules/buildsystem/templates/upload.conf index c3471219..2d39bb76 100644 --- a/modules/buildsystem/templates/upload.conf +++ b/modules/buildsystem/templates/upload.conf @@ -7,9 +7,17 @@ # ### +<%- + build_nodes = scope.lookupvar('buildsystem::var::scheduler::build_nodes') +-%> my %nodes = ( - i586 => [ qw(jonund0 ecosse0 jonund1 ecosse1) ], - x86_64 => [ qw(ecosse0 jonund0 ecosse1 jonund1) ], +<%- + build_nodes.keys.sort.each{|arch| +-%> + <%= arch -%> => [ '<%= build_nodes[arch].join("', '") -%>' ], +<%- + } +-%> ); my $repository = "http://<%= scope.lookupvar('buildsystem::var::repository::hostname') %>/<%= scope.lookupvar('buildsystem::var::repository::distribdir') %>/"; my $homedir = "<%= scope.lookupvar('buildsystem::var::iurt::homedir') %>"; |