Teach GitStatus to handle notifications of specific branches #56

Merged
merged 1 commit into from Mar 6, 2012

Conversation

Projects
None yet
2 participants

lmarlow commented Mar 6, 2012

A comma delimited list of affected branches can be sent to the
notifyCommit endpoint now. Only the builds that match those branches
will be triggered. If no branch parameter is sent then any build that
matches the repository URL will be triggered.

http://yourserver/jenkins/git/notifyCommit?url=aUrl&branches=master,topic

The url can be hit from the post-update hook with a script like the following:

#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".

echo Update pushed to repo
branch_list=""
delim=""

for ref in $@; do
  branch="$(git rev-parse --symbolic --abbrev-ref $ref)"
  branch_list=${branch_list}${delim}${branch}
  delim=","
done
curl "http://yourserver/jenkins/git/notifyCommit?url=aUrl&branches=${branch_list}" 2>/dev/null
@lmarlow lmarlow Teach GitStatus to handle notifications of specific branches
A comma delimited list of affected branches can be sent to the
notifyCommit endpoint now. Only the builds that match those branches
will be triggered. If no branch parameter is sent then any build that
matches the repository URL will be triggered.

http://yourserver/jenkins/git/notifyCommit?url=aUrl&branches=master,topic
a4266b4

@ndeloof ndeloof added a commit that referenced this pull request Mar 6, 2012

@ndeloof ndeloof Merge pull request #56 from lmarlow/notify_commit_with_branches
Teach GitStatus to handle notifications of specific branches
710468e

@ndeloof ndeloof merged commit 710468e into jenkinsci:master Mar 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment