summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-08-21 22:44:49 +0300
committerrandx <dmitriy.zaporozhets@gmail.com>2012-08-21 22:45:14 +0300
commitd1daeba1736ba145fe525ce08a91f29495a3abf1 (patch)
treed64b3f9765535112b7398bde8cea347589d7427b
parentd862ebd3b340d46937e0bf37c382fd93056b238e (diff)
downloadgitlab-ce-d1daeba1736ba145fe525ce08a91f29495a3abf1.tar.gz
Updated app:status & docs with hooks. Removed write_hooks from app:setup
-rw-r--r--doc/installation.md7
-rw-r--r--lib/tasks/gitlab/setup.rake1
-rw-r--r--lib/tasks/gitlab/status.rake14
3 files changed, 20 insertions, 2 deletions
diff --git a/doc/installation.md b/doc/installation.md
index 5611c3b37e4..1d32e1b7582 100644
--- a/doc/installation.md
+++ b/doc/installation.md
@@ -119,7 +119,6 @@ Permissions:
sudo chmod -R g+rwX /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
@@ -177,6 +176,11 @@ Permissions:
#### Setup DB
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:
@@ -196,6 +200,7 @@ Checking status:
Resolving deltas: 100% (174/174), done.
Can clone gitolite-admin?............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.
diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake
index 21ce5d7083c..49c86461c0b 100644
--- a/lib/tasks/gitlab/setup.rake
+++ b/lib/tasks/gitlab/setup.rake
@@ -4,7 +4,6 @@ namespace :gitlab do
task :setup => [
'db:setup',
'db:seed_fu',
- 'gitlab:gitolite:write_hooks',
'gitlab:app:enable_automerge'
]
end
diff --git a/lib/tasks/gitlab/status.rake b/lib/tasks/gitlab/status.rake
index a16b1512dde..02d27d4bbcc 100644
--- a/lib/tasks/gitlab/status.rake
+++ b/lib/tasks/gitlab/status.rake
@@ -56,6 +56,20 @@ namespace :gitlab do
return
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
puts "Validating projects repositories:".yellow
Project.find_each(:batch_size => 100) do |project|