summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-14 14:02:18 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-14 14:02:18 +0200
commit12331a552b5921d6d212db774360a8f154fbffb0 (patch)
treedbcd2ec80f1ec70a5e92ba97bdcf5ae743da489c /hooks
parentba68af63031a396df644807e1a428b5364f457da (diff)
downloadgitlab-shell-12331a552b5921d6d212db774360a8f154fbffb0.tar.gz
Use update hook to add post event to redis. Use GL_ID instead of GL_USER
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/post-receive13
-rwxr-xr-xhooks/update2
2 files changed, 5 insertions, 10 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
index ebd9e1a..acb1e40 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -1,11 +1,6 @@
-#!/usr/bin/env bash
+#!/usr/bin/env ruby
-# This file was placed here by GitLab. It makes sure that your pushed commits
-# will be processed properly.
+# This file was placed here by GitLab.
+# IT IS DEPRECATED NOW.
+# All GitLab logic handled by update hook
-while read oldrev newrev ref
-do
- # For every branch or tag that was pushed, create a Resque job in redis.
- repo_path=`pwd`
- env -i redis-cli rpush "resque:gitlab:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$repo_path\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > /dev/null 2>&1
-done
diff --git a/hooks/update b/hooks/update
index f483cc0..39ea196 100755
--- a/hooks/update
+++ b/hooks/update
@@ -4,7 +4,7 @@
# will be processed properly.
refname = ARGV[0]
-key_id = ENV['GL_USER']
+key_id = ENV['GL_ID']
repo_path = `pwd`
require_relative '../lib/gitlab_update'