aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-23 15:04:59 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-23 15:04:59 +0000
commitb20c4921246411a27afb95369fcf59d756f82434 (patch)
tree33fdd530a5ba91dc554119f3fce7c26b962ad3cf /modules/buildsystem
parentb919b72d6572d3ee1d5d7ff77238e2a277d747dd (diff)
downloadpuppet-b20c4921246411a27afb95369fcf59d756f82434.tar
puppet-b20c4921246411a27afb95369fcf59d756f82434.tar.gz
puppet-b20c4921246411a27afb95369fcf59d756f82434.tar.bz2
puppet-b20c4921246411a27afb95369fcf59d756f82434.tar.xz
puppet-b20c4921246411a27afb95369fcf59d756f82434.zip
Create buildsystem::var::distros
buildsystem::var::distros will be used to store the list of distributions and their configuration, medias, etc ... The list of distributions and medias has been removed from buildsystem::mgarepo and moved to mga_buildsystem::config.
Diffstat (limited to 'modules/buildsystem')
-rw-r--r--modules/buildsystem/manifests/create_upload_dir.rb16
-rw-r--r--modules/buildsystem/manifests/mgarepo.pp28
-rw-r--r--modules/buildsystem/manifests/var/distros.pp3
3 files changed, 13 insertions, 34 deletions
diff --git a/modules/buildsystem/manifests/create_upload_dir.rb b/modules/buildsystem/manifests/create_upload_dir.rb
index dcd27afe..f3e16a3e 100644
--- a/modules/buildsystem/manifests/create_upload_dir.rb
+++ b/modules/buildsystem/manifests/create_upload_dir.rb
@@ -1,4 +1,6 @@
hostclass "buildsystem::create_upload_dir" do
+ include 'buildsystem::var::scheduler'
+ include 'buildsystem::var::distros'
states = ["todo","done","failure","queue","rejected"]
owner = scope.lookupvar('buildsystem::var::scheduler::login')
group = owner
@@ -9,17 +11,17 @@ hostclass "buildsystem::create_upload_dir" do
for st in states do
file [uploads_dir, st].join('/'), :ensure => 'directory', :owner => owner, :group => group
- scope.lookupvar('buildsystem::mgarepo::releases').each{|rel, repositories|
+ scope.lookupvar('buildsystem::var::distros::distros').each{|rel, distro|
file [uploads_dir, st, rel].join('/'), :ensure => 'directory', :owner => owner, :group => group
+ medias = distro['medias']
+ medias.each{|media, repos|
+ file [uploads_dir, st, rel, media].join('/'), :ensure => 'directory', :owner => owner, :group => group
- repositories.each{|rep, medias|
- file [uploads_dir, st, rel, rep].join('/'), :ensure => 'directory', :owner => owner, :group => group
-
- for med in medias do
+ for repo in repos do
if st == 'done'
- file [uploads_dir, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => owner, :group => group, :mode => 0775
+ file [uploads_dir, st, rel, media, repo].join('/'), :ensure => 'directory', :owner => owner, :group => group, :mode => 0775
else
- file [uploads_dir, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => owner, :group => group
+ file [uploads_dir, st, rel, media, repo].join('/'), :ensure => 'directory', :owner => owner, :group => group
end
end
}
diff --git a/modules/buildsystem/manifests/mgarepo.pp b/modules/buildsystem/manifests/mgarepo.pp
index 6078ee51..3f9e2f40 100644
--- a/modules/buildsystem/manifests/mgarepo.pp
+++ b/modules/buildsystem/manifests/mgarepo.pp
@@ -2,6 +2,7 @@ class buildsystem::mgarepo {
include buildsystem::var::scheduler
include buildsystem::var::groups
include buildsystem::var::binrepo
+ include buildsystem::create_upload_dir
$sched_login = $buildsystem::var::scheduler::login
$sched_home_dir = $buildsystem::var::scheduler::homedir
@@ -32,33 +33,6 @@ class buildsystem::mgarepo {
# require => File[$sched_home_dir],
#}
- #FIXME This config information should be moved out of this class
- $releases = {
- 'cauldron' => {
- 'core' => ['release','updates_testing','backports_testing','backports','updates'],
- 'nonfree' => ['release','updates_testing','backports_testing','backports','updates'],
- 'tainted' => ['release','updates_testing','backports_testing','backports','updates'],
- },
- '1' => {
- 'core' => ['release','updates_testing','backports_testing','backports','updates'],
- 'nonfree' => ['release','updates_testing','backports_testing','backports','updates'],
- 'tainted' => ['release','updates_testing','backports_testing','backports','updates'],
- },
- '2' => {
- 'core' => ['release','updates_testing','backports_testing','backports','updates'],
- 'nonfree' => ['release','updates_testing','backports_testing','backports','updates'],
- 'tainted' => ['release','updates_testing','backports_testing','backports','updates'],
- },
- 'infra_1' => {
- 'infra' => ['release']
- },
- 'infra_2' => {
- 'infra' => ['release']
- },
- }
-
- include buildsystem::create_upload_dir
-
tidy { "$sched_home_dir/uploads":
type => 'ctime',
recurse => true,
diff --git a/modules/buildsystem/manifests/var/distros.pp b/modules/buildsystem/manifests/var/distros.pp
new file mode 100644
index 00000000..cd53abfd
--- /dev/null
+++ b/modules/buildsystem/manifests/var/distros.pp
@@ -0,0 +1,3 @@
+class buildsystem::var::distros(
+ $distros
+) { }