Commit 758b17d2 authored by Sergio Díaz's avatar Sergio Díaz

Rake tasks for settings for gitolite and checkout in staging

parent 59f92c97
namespace :staging do
desc "Updates all settings for staging"
task :update_settings => [
"staging:update_settings:gitolite",
"staging:update_settings:checkout"
]
namespace :update_settings do
desc "Set staging settings for plugin redmine_gitolite"
task :gitolite => :environment do
Setting[:plugin_redmine_gitolite] = {
"developerBaseUrls"=>"git@staging.es:",
"basePath"=>"/opt/git/repositories/",
"readOnlyBaseUrls"=>"git://staging.es/",
"gitoliteUrl"=>"git@staging.es:gitolite-admin.git",
"gitoliteIdentityFile"=>"/home/rails/.ssh/id_rsa"
}
end
desc "Set staging settings for plugin redmine_checkout"
task :checkout, [:needs] => :environment do
task :checkout => :environment do
Setting[:plugin_redmine_checkout] = {
:description_Mercurial=>"",
:display_command_Darcs=>"0",
......@@ -14,7 +32,8 @@ namespace :staging do
:is_default=>"1",
:protocol=>"Darcs",
:regex_replacement=>"",
:access=>"permission"}],
:access=>"permission"
}],
:use_zero_clipboard=>"1",
:protocols_Mercurial=>[{
:regex=>"",
......@@ -22,7 +41,8 @@ namespace :staging do
:is_default=>"1",
:protocol=>"Mercurial",
:regex_replacement=>"",
:access=>"permission"}],
:access=>"permission"
}],
:display_login=>"",
:display_checkout_info=>"1",
:overwrite_description_Darcs=>"0",
......@@ -36,7 +56,8 @@ namespace :staging do
:is_default=>"1",
:protocol=>"Bazaar",
:regex_replacement=>"",
:access=>"permission"}],
:access=>"permission"
}],
:description_Git=>"",
:description_Abstract=>"The data contained in this repository can be downloaded to your computer using one of several clients.\nPlease see the documentation of your version control software client for more information.\n\nPlease select the desired protocol below to get the URL.\n",
:display_command_Mercurial=>"0",
......@@ -46,13 +67,15 @@ namespace :staging do
:command=>"git clone",
:is_default=>"1",
:protocol=>"Git",
:regex_replacement=>"git@ohwr.stataging.es:\\1.git",
:access=>"read+write"},
{:regex=>"\\/opt\\/git\\/repositories\\/(.*)\\.git",
:regex_replacement=>"git@staging.es:\\1.git",
:access=>"read+write"
},{
:regex=>"\\/opt\\/git\\/repositories\\/(.*)\\.git",
:command=>"git clone",
:protocol=>"Git Read Only",
:regex_replacement=>"git://ohwr.staging.es/\\1.git",
:access=>"read-only"}],
:regex_replacement=>"git://staging.es/\\1.git",
:access=>"read-only"
}],
:description_Bazaar=>"",
:overwrite_description_Git=>"0",
:description_Cvs=>"",
......@@ -64,16 +87,18 @@ namespace :staging do
:is_default=>"1",
:protocol=>"Cvs",
:regex_replacement=>"",
:access=>"permission"}],
:access=>"permission"
}],
:protocols_Subversion=>[{
:regex=>"file:\\/\\/\\/opt\\/svn\\/(.*)",
:append_path=>"1",
:command=>"svn checkout",
:is_default=>"1",
:protocol=>"Subversion",
:regex_replacement=>"http://svn.ohwr.staging.es/\\1",
:access=>"permission"}]
:regex_replacement=>"http://svn.staging.es/\\1",
:access=>"permission"
}]
}
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment