Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@
"${git_home}/gitlab/tmp/pids",
"${git_home}/gitlab/tmp/sockets",
"${git_home}/gitlab/public",
"${git_home}/gitlab/public/uploads",
]:
ensure => directory,
mode => '0755',
}
file { [
"${git_home}/gitlab/public/uploads",
]:
ensure => directory,
mode => '0750',
}

#gitlab does not provide an option to configure a log directory, so create a symlink to
#the desired folder if specified (otherwise, simply ensure the default log folder is there)
Expand Down
9 changes: 8 additions & 1 deletion spec/classes/gitlab_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,19 @@
)}
end # gitlab logrotate
describe 'gitlab directories' do
['gitlab/tmp','gitlab/tmp/pids','gitlab/tmp/sockets','gitlab/log','gitlab/public','gitlab/public/uploads'].each do |dir|
['gitlab/tmp','gitlab/tmp/pids','gitlab/tmp/sockets','gitlab/log','gitlab/public'].each do |dir|
it { is_expected.to contain_file("/home/git/#{dir}").with(
:ensure => 'directory',
:mode => '0755'
)}
end

['gitlab/public/uploads'].each do |dir|
it { is_expected.to contain_file("/home/git/#{dir}").with(
:ensure => 'directory',
:mode => '0750'
)}
end
end # gitlab directories

describe 'no gitlab backup by default' do
Expand Down