Updating variable name to be custom_hooks_dir, formatting cleanup
* Using custom_hooks_dir, not custom_hook_dir * Fixed missed reference in gitlab.rb.template * Using %r for regex's in specs that reference a path
This commit is contained in:
parent
bd174bef87
commit
f753e1f040
|
@ -471,7 +471,7 @@ external_url 'GENERATED_EXTERNAL_URL'
|
|||
# gitlab_shell['log_level'] = 'INFO'
|
||||
# gitlab_shell['http_settings'] = { user: 'username', password: 'password', ca_file: '/etc/ssl/cert.pem', ca_path: '/etc/pki/tls/certs', self_signed_cert: false}
|
||||
# gitlab_shell['log_directory'] = "/var/log/gitlab/gitlab-shell/"
|
||||
# gitlab_shell['hook_dir'] = "/opt/gitlab/embedded/service/gitlab-shell/hooks"
|
||||
# gitlab_shell['custom_hooks_dir'] = "/opt/gitlab/embedded/service/gitlab-shell/hooks"
|
||||
|
||||
## If enabled, git-annex needs to be installed on the server where GitLab is setup
|
||||
# For Debian and Ubuntu systems this can be done with: sudo apt-get install git-annex
|
||||
|
|
|
@ -331,7 +331,7 @@ default['gitlab']['gitlab-shell']['http_settings'] = nil
|
|||
default['gitlab']['gitlab-shell']['git_annex_enabled'] = nil
|
||||
default['gitlab']['gitlab-shell']['auth_file'] = nil
|
||||
default['gitlab']['gitlab-shell']['git_trace_log_file'] = nil
|
||||
default['gitlab']['gitlab-shell']['custom_hook_dir'] = nil
|
||||
default['gitlab']['gitlab-shell']['custom_hooks_dir'] = nil
|
||||
|
||||
###
|
||||
# PostgreSQL
|
||||
|
|
|
@ -107,7 +107,7 @@ templatesymlink "Create a config.yml and create a symlink to Rails root" do
|
|||
:http_settings => node['gitlab']['gitlab-shell']['http_settings'],
|
||||
:git_annex_enabled => node['gitlab']['gitlab-shell']['git_annex_enabled'],
|
||||
:git_trace_log_file => node['gitlab']['gitlab-shell']['git_trace_log_file'],
|
||||
:custom_hook_dir => node['gitlab']['gitlab-shell']['custom_hook_dir']
|
||||
:custom_hooks_dir => node['gitlab']['gitlab-shell']['custom_hooks_dir']
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
@ -67,6 +67,6 @@ git_annex_enabled: <%= @git_annex_enabled %>
|
|||
<% if @git_trace_log_file %>
|
||||
git_trace_log_file: "<%= @git_trace_log_file %>"
|
||||
<% end %>
|
||||
<% if @custom_hook_dir %>
|
||||
custom_hook_dir: "<%= @custom_hook_dir %>"
|
||||
<% if @custom_hooks_dir %>
|
||||
custom_hooks_dir: "<%= @custom_hooks_dir %>"
|
||||
<% end %>
|
||||
|
|
|
@ -32,9 +32,9 @@ describe 'gitlab::gitlab-shell' do
|
|||
expect(chef_run).to render_file('/var/opt/gitlab/gitlab-shell/config.yml')
|
||||
.with_content { |content|
|
||||
expect(content).to match(
|
||||
/log_file: "\/var\/log\/gitlab\/gitlab-shell\/gitlab-shell.log"/
|
||||
%r{log_file: "/var/log/gitlab/gitlab-shell/gitlab-shell.log"}
|
||||
)
|
||||
expect(content).not_to match(/^custom_hook_dir: /)
|
||||
expect(content).not_to match(/^custom_hooks_dir: /)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -207,14 +207,14 @@ describe 'gitlab::gitlab-shell' do
|
|||
before do
|
||||
stub_gitlab_rb(
|
||||
gitlab_shell: {
|
||||
custom_hook_dir: '/fake/dir'
|
||||
custom_hooks_dir: '/fake/dir'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
it 'populates with custom values' do
|
||||
expect(chef_run).to render_file('/var/opt/gitlab/gitlab-shell/config.yml')
|
||||
.with_content(%r{custom_hook_dir: "\/fake\/dir"})
|
||||
.with_content(%r{custom_hooks_dir: "/fake/dir"})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue