Skip to content

Instantly share code, notes, and snippets.

@warriorg
Created October 28, 2016 05:42
Show Gist options
  • Save warriorg/83ecec791c95d7e0a744fad538e7db3b to your computer and use it in GitHub Desktop.
Save warriorg/83ecec791c95d7e0a744fad538e7db3b to your computer and use it in GitHub Desktop.
触发Jenkins构建
#!/bin/bash
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ "developer" == $branch ]; then
echo 'start call jenkins'
curl -s --user 用户名:密码 url
echo 'end call jenkins'
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment