Created Autobuilding from Atlassian Stash (rdoc)
parent
22b5ec47b6
commit
a07ebec30c
1 changed files with 11 additions and 0 deletions
11
Autobuilding-from-Atlassian-Stash.rdoc
Normal file
11
Autobuilding-from-Atlassian-Stash.rdoc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
It is possible to use Stashes External Post Receive Hooks.
|
||||
Create a post_receive.sh script with execution rights.
|
||||
Have the EPRH execute the shell script with a positional parameter of your PHPCI build id.
|
||||
|
||||
PROJECT_ID=$1
|
||||
PHPCI_URL="http://ci.site.com"
|
||||
while read from_ref to_ref ref_name; do
|
||||
BRANCH=$(git rev-parse --symbolic --abbrev-ref $ref_name)
|
||||
echo "Sending webhook"
|
||||
curl "$PHPCI_URL/webhook/git/$PROJECT_ID?branch=$BRANCH&commit=$to_ref"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue