Added cooks/releases auto-upload

This commit is contained in:
Mike Scherbakov 2012-07-02 16:35:34 +04:00
parent 39d8eb58f1
commit 70a709215c
2 changed files with 22 additions and 5 deletions

View File

@ -0,0 +1,17 @@
cooks = Dir.glob("#{node[:nailgun][:root]}/os-cookbooks/cookbooks/*").select {|f| File.directory? f}
cooks.each do |cook|
bash "Bash script for cookbook installation #{cook}" do
code <<-EOH
#{node[:nailgun][:root]}/bin/install_cookbook "#{cook}"
EOH
end
end
releases = Dir.glob("#{node[:nailgun][:root]}/os-cookbooks/releases/*.json")
releases.each do |rls|
bash "Bash script for release creation #{rls}" do
code <<-EOH
#{node[:nailgun][:root]}/bin/create_release "#{rls}"
EOH
end
end

View File

@ -1,8 +1,8 @@
{
"recipes": [
"repo::http",
"nailgun::server",
"cobbler::default"
"repo::http",
"nailgun::server",
"cobbler::default",
"nailgun::upload"
]
}