Faça o Jenkins rastreando as atualizações do git

no servidor jenkins:

@jenkins $ mkdir /var/git/project.git
@jenkins $ cd /var/git/project.git
@jenkins $ git init --bare --shared

na origem:

@origin $ cd /var/git/project.git
@origin $ cp hooks/post-receive.sample hooks/post-receive
@origin $ vi hooks/post-receive


#!/bin/sh
#####
# hooks/post-receive
#####

MIRROR_HOST
='jenkins@jenkins'
REPO_NAME
=`pwd | perl -e '$t=<stdin>;$t=~ s!^.*/!!;print $t'`

git push
--mirror ${MIRROR_HOST}:/var/git/${REPO_NAME}