Commit 30a1bf3ee616905c69bf77ef8fbc21c0da8f4d6d
1 parent
ce0a1ad0
Exists in
master
and in
17 other branches
Delete checked-in empty directories
Showing
1 changed file
with
12 additions
and
5 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/recipes/gitlab-core.rb
@@ -74,12 +74,19 @@ unicorn_config File.join(gitlab_core_etc_dir, "unicorn.rb") do | @@ -74,12 +74,19 @@ unicorn_config File.join(gitlab_core_etc_dir, "unicorn.rb") do | ||
74 | notifies :restart, 'service[gitlab-core]' if should_notify | 74 | notifies :restart, 'service[gitlab-core]' if should_notify |
75 | end | 75 | end |
76 | 76 | ||
77 | -link "/opt/gitlab/embedded/service/gitlab-core/tmp" do | ||
78 | - to gitlab_core_tmp_dir | ||
79 | -end | 77 | +# replace empty directories in the Git repo with symlinks to /var/opt/gitlab |
78 | +{ | ||
79 | + "/opt/gitlab/embedded/service/gitlab-core/tmp" => gitlab_core_tmp_dir, | ||
80 | + "/opt/gitlab/embedded/service/gitlab-core/log" => gitlab_core_log_dir | ||
81 | +}.each do |link_dir, target_dir| | ||
82 | + directory link_dir do | ||
83 | + action :delete | ||
84 | + recursive true | ||
85 | + end | ||
80 | 86 | ||
81 | -link "/opt/gitlab/embedded/service/gitlab-core/log" do | ||
82 | - to gitlab_core_log_dir | 87 | + link link_dir do |
88 | + to target_dir | ||
89 | + end | ||
83 | end | 90 | end |
84 | 91 | ||
85 | execute "chown -R #{node['gitlab']['user']['username']} /opt/gitlab/embedded/service/gitlab-core/public" | 92 | execute "chown -R #{node['gitlab']['user']['username']} /opt/gitlab/embedded/service/gitlab-core/public" |