Skip to content

Instantly share code, notes, and snippets.

@fideloper
Created July 27, 2019 02:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fideloper/fcf4073571ede1f904ce8bc3d885f719 to your computer and use it in GitHub Desktop.
Save fideloper/fcf4073571ede1f904ce8bc3d885f719 to your computer and use it in GitHub Desktop.
Chipper CI pipeline step to send build trigger
# Send a build trigger depending on the branch
# Docs on available env vars here: https://docs.chipperci.com/builds/env/
if [[ $CI_COMMIT_BRANCH == 'master' ]]; then
curl -X POST https://my-webhook-url/master/some-token -d branch=$CI_COMMIT_BRANCH -d commit=$CI_COMMIT_SHA
fi
if [[ $CI_COMMIT_BRANCH == 'develop' ]]; then
curl -X POST https://my-webhook-url/develop/some-token -d branch=$CI_COMMIT_BRANCH -d commit=$CI_COMMIT_SHA
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment