Commit dd47f9532ff8015e3d981ba4fd7341b7514ae109
1 parent
c883660a
Exists in
spb-stable
and in
2 other branches
Fix gitlab-shell setup rake task
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
lib/tasks/gitlab/shell.rake
@@ -11,7 +11,8 @@ namespace :gitlab do | @@ -11,7 +11,8 @@ namespace :gitlab do | ||
11 | gitlab_url = Settings.gitlab.url | 11 | gitlab_url = Settings.gitlab.url |
12 | # gitlab-shell requires a / at the end of the url | 12 | # gitlab-shell requires a / at the end of the url |
13 | gitlab_url += "/" unless gitlab_url.match(/\/$/) | 13 | gitlab_url += "/" unless gitlab_url.match(/\/$/) |
14 | - target_dir = File.join(home_dir, "gitlab-shell") | 14 | + repos_path = Gitlab.config.gitlab_shell.repos_path |
15 | + target_dir = Gitlab.config.gitlab_shell.path | ||
15 | 16 | ||
16 | # Clone if needed | 17 | # Clone if needed |
17 | unless File.directory?(target_dir) | 18 | unless File.directory?(target_dir) |
@@ -28,7 +29,7 @@ namespace :gitlab do | @@ -28,7 +29,7 @@ namespace :gitlab do | ||
28 | user: user, | 29 | user: user, |
29 | gitlab_url: gitlab_url, | 30 | gitlab_url: gitlab_url, |
30 | http_settings: {self_signed_cert: false}, | 31 | http_settings: {self_signed_cert: false}, |
31 | - repos_path: File.join(home_dir, "repositories"), | 32 | + repos_path: repos_path, |
32 | auth_file: File.join(home_dir, ".ssh", "authorized_keys"), | 33 | auth_file: File.join(home_dir, ".ssh", "authorized_keys"), |
33 | redis: { | 34 | redis: { |
34 | bin: %x{which redis-cli}.chomp, | 35 | bin: %x{which redis-cli}.chomp, |
@@ -38,7 +39,7 @@ namespace :gitlab do | @@ -38,7 +39,7 @@ namespace :gitlab do | ||
38 | }, | 39 | }, |
39 | log_level: "INFO", | 40 | log_level: "INFO", |
40 | audit_usernames: false | 41 | audit_usernames: false |
41 | - } | 42 | + }.stringify_keys |
42 | 43 | ||
43 | # Generate config.yml based on existing gitlab settings | 44 | # Generate config.yml based on existing gitlab settings |
44 | File.open("config.yml", "w+") {|f| f.puts config.to_yaml} | 45 | File.open("config.yml", "w+") {|f| f.puts config.to_yaml} |