diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-04 10:08:13 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-04 10:08:13 +0200 |
commit | c2bf1061c2b5c739f4ced047e7cda4ce2a4929df (patch) | |
tree | 4b4f4418a88ce4da42e8350a5f8c73bb07f8e20b /hooks | |
parent | 4908b89495e27b6ea829f32143c7753a6139df32 (diff) | |
download | gitlab-shell-c2bf1061c2b5c739f4ced047e7cda4ce2a4929df.tar.gz |
link post-receive hook also
Diffstat (limited to 'hooks')
-rw-r--r-- | hooks/post-receive | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive new file mode 100644 index 0000000..6944d3e --- /dev/null +++ b/hooks/post-receive @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Version 4.1 +# This file was placed here by GitLab. It makes sure that your pushed commits +# will be processed properly. + +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 |