Merge branch 'global_gitconfig_configurable' into 'master'
Global gitconfig configurable Fixes #385 See merge request !270
This commit is contained in:
commit
8eae0942ec
|
@ -53,9 +53,4 @@ NO_PYTHON=YesPlease
|
|||
|
||||
command "make -j #{max_build_jobs}", :env => env
|
||||
command "make install"
|
||||
|
||||
mkdir "#{install_dir}/embedded/etc/"
|
||||
erb :dest => "#{install_dir}/embedded/etc/gitconfig",
|
||||
:source => "gitconfig.erb",
|
||||
:mode => 0755
|
||||
end
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[receive]
|
||||
fsckObjects = true
|
|
@ -372,6 +372,15 @@ external_url 'GENERATED_EXTERNAL_URL'
|
|||
|
||||
# logrotate['enable'] = true
|
||||
|
||||
#######
|
||||
# Git #
|
||||
#######
|
||||
## Advanced setting for configuring git system settings for omnibus-gitlab internal git
|
||||
## For multiple options under one header use array of comma separated values, eg.
|
||||
## { "receive" => ["fsckObjects = true"], "alias" => ["st = status", "co = checkout"] }
|
||||
|
||||
# omnibus_gitconfig['system'] = { "receive" => ["fsckObjects = true"] }
|
||||
|
||||
############################################
|
||||
# Url on which GitLab CI will be reachable #
|
||||
############################################
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
# omnibus options
|
||||
####
|
||||
default['gitlab']['bootstrap']['enable'] = true
|
||||
default['gitlab']['omnibus-gitconfig']['system'] = {
|
||||
"receive" => ["fsckObjects = true"]
|
||||
}
|
||||
|
||||
|
||||
####
|
||||
|
|
|
@ -35,6 +35,7 @@ module Gitlab
|
|||
extend(Mixlib::Config)
|
||||
|
||||
bootstrap Mash.new
|
||||
omnibus_gitconfig Mash.new
|
||||
user Mash.new
|
||||
postgresql Mash.new
|
||||
redis Mash.new
|
||||
|
@ -229,6 +230,7 @@ module Gitlab
|
|||
results = { "gitlab" => {} }
|
||||
[
|
||||
"bootstrap",
|
||||
"omnibus_gitconfig",
|
||||
"user",
|
||||
"redis",
|
||||
"ci_redis",
|
||||
|
|
|
@ -45,6 +45,20 @@ directory "/var/opt/gitlab" do
|
|||
action :create
|
||||
end
|
||||
|
||||
directory "/opt/gitlab/embedded/etc" do
|
||||
owner "root"
|
||||
group "root"
|
||||
mode "0755"
|
||||
recursive true
|
||||
action :create
|
||||
end
|
||||
|
||||
template "/opt/gitlab/embedded/etc/gitconfig" do
|
||||
source "gitconfig-system.erb"
|
||||
mode 0755
|
||||
variables gitconfig: node['gitlab']['omnibus-gitconfig']['system']
|
||||
end
|
||||
|
||||
include_recipe "gitlab::users"
|
||||
include_recipe "gitlab::web-server"
|
||||
include_recipe "gitlab::gitlab-shell"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<% @gitconfig.each do |key, value| %>
|
||||
[<%= key %>]
|
||||
<%= value.join("\n") %>
|
||||
<% end %>
|
|
@ -7,5 +7,3 @@
|
|||
email = <%= node['gitlab']['user']['git_user_email'] %>
|
||||
[core]
|
||||
autocrlf = input
|
||||
[receive]
|
||||
fsckObjects = true
|
||||
|
|
Loading…
Reference in New Issue