aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-24 01:32:06 +0000
committerMichael Scherer <misc@mageia.org>2011-01-24 01:32:06 +0000
commitd289d90533c832f83e7ba1bd846078d08717f617 (patch)
treec475b0bf81683f23e0a2fd6b035434be7cb71728 /modules/buildsystem
parenta881b129fa07d958a9bf03fc0c894a1649dbde27 (diff)
downloadpuppet-d289d90533c832f83e7ba1bd846078d08717f617.tar
puppet-d289d90533c832f83e7ba1bd846078d08717f617.tar.gz
puppet-d289d90533c832f83e7ba1bd846078d08717f617.tar.bz2
puppet-d289d90533c832f83e7ba1bd846078d08717f617.tar.xz
puppet-d289d90533c832f83e7ba1bd846078d08717f617.zip
- create ~schedbot/uploads hierarchy using a ruby dsl module ( see
http://projects.puppetlabs.com/projects/1/wiki/Ruby_Dsl )
Diffstat (limited to 'modules/buildsystem')
-rw-r--r--modules/buildsystem/manifests/create_upload_dir.rb23
-rw-r--r--modules/buildsystem/manifests/init.pp8
2 files changed, 31 insertions, 0 deletions
diff --git a/modules/buildsystem/manifests/create_upload_dir.rb b/modules/buildsystem/manifests/create_upload_dir.rb
new file mode 100644
index 00000000..536180e2
--- /dev/null
+++ b/modules/buildsystem/manifests/create_upload_dir.rb
@@ -0,0 +1,23 @@
+define "create_upload_dir", :owner do
+
+ states = ["todo","done","failure","queue","rejected"]
+ releases = ["cauldron"]
+ repositories = ["core","nonfree","tainted"]
+ medias = ['release']
+
+ for st in states do
+ file [@name, st].join('/'), :ensure => 'directory', :owner => @owner
+
+ for rel in releases do
+ file [@name, st, rel].join('/'), :ensure => 'directory', :owner => @owner
+
+ for rep in repositories do
+ file [@name, st, rel, rep].join('/'), :ensure => 'directory', :owner => @owner
+
+ for med in medias do
+ file [@name, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => @owner
+ end
+ end
+ end
+ end
+end
diff --git a/modules/buildsystem/manifests/init.pp b/modules/buildsystem/manifests/init.pp
index 2e4db826..de78e763 100644
--- a/modules/buildsystem/manifests/init.pp
+++ b/modules/buildsystem/manifests/init.pp
@@ -123,6 +123,14 @@ class buildsystem {
owner => $sched_login,
require => File[$sched_home_dir],
}
+
+ # too tedious to create everything by hand
+ # so I prefered to used some puppet ruby module
+ # the exact content and directory name should IMHO be consolidated somewhere
+ import "create_upload_dir.rb"
+ create_upload_dir { "$sched_home_dir/uploads":
+ owner => $sched_login,
+ }
}
class youri_submit {