summaryrefslogtreecommitdiff
path: root/lib/hooks/post-receive
blob: 4a3ce372eb8177a7f1f31980beac6c48ced888c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash

# 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.
  pwd=`pwd`
  reponame=`basename "$pwd" | sed s/\.git$//`
  env -i redis-cli rpush "resque:gitlab:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$reponame\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > /dev/null 2>&1
done