Updated app:status & docs with hooks. Removed write_hooks from app:setup
This commit is contained in:
parent
d862ebd3b3
commit
d1daeba173
|
@ -119,7 +119,6 @@ Permissions:
|
||||||
|
|
||||||
sudo chmod -R g+rwX /home/git/repositories/
|
sudo chmod -R g+rwX /home/git/repositories/
|
||||||
sudo chown -R git:git /home/git/repositories/
|
sudo chown -R git:git /home/git/repositories/
|
||||||
sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive
|
|
||||||
|
|
||||||
#### CHECK: Logout & login again to apply git group to your user
|
#### CHECK: Logout & login again to apply git group to your user
|
||||||
|
|
||||||
|
@ -178,6 +177,11 @@ Permissions:
|
||||||
|
|
||||||
sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
|
sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
|
||||||
|
|
||||||
|
#### Setup gitlab hooks
|
||||||
|
|
||||||
|
sudo cp ./lib/hooks/post-receive /home/git/share/gitolite/hooks/common/post-receive
|
||||||
|
sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive
|
||||||
|
|
||||||
Checking status:
|
Checking status:
|
||||||
|
|
||||||
sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
|
sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
|
||||||
|
@ -196,6 +200,7 @@ Checking status:
|
||||||
Resolving deltas: 100% (174/174), done.
|
Resolving deltas: 100% (174/174), done.
|
||||||
Can clone gitolite-admin?............YES
|
Can clone gitolite-admin?............YES
|
||||||
UMASK for .gitolite.rc is 0007? ............YES
|
UMASK for .gitolite.rc is 0007? ............YES
|
||||||
|
/home/git/share/gitolite/hooks/common/post-receive exists? ............YES
|
||||||
|
|
||||||
If you got all YES - congrats! You can go to next step.
|
If you got all YES - congrats! You can go to next step.
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace :gitlab do
|
||||||
task :setup => [
|
task :setup => [
|
||||||
'db:setup',
|
'db:setup',
|
||||||
'db:seed_fu',
|
'db:seed_fu',
|
||||||
'gitlab:gitolite:write_hooks',
|
|
||||||
'gitlab:app:enable_automerge'
|
'gitlab:app:enable_automerge'
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,6 +56,20 @@ namespace :gitlab do
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
gitolite_hooks_path = File.join("/home", Gitlab.config.ssh_user, "share", "gitolite", "hooks", "common")
|
||||||
|
gitlab_hook_files = ['post-receive']
|
||||||
|
gitlab_hook_files.each do |file_name|
|
||||||
|
dest = File.join(gitolite_hooks_path, file_name)
|
||||||
|
print "#{dest} exists? ............"
|
||||||
|
if File.exists?(dest)
|
||||||
|
puts "YES".green
|
||||||
|
else
|
||||||
|
puts "NO".red
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
if Project.count > 0
|
if Project.count > 0
|
||||||
puts "Validating projects repositories:".yellow
|
puts "Validating projects repositories:".yellow
|
||||||
Project.find_each(:batch_size => 100) do |project|
|
Project.find_each(:batch_size => 100) do |project|
|
||||||
|
|
Loading…
Reference in a new issue