Created
January 8, 2019 15:33
-
-
Save jbmlaird/059466e72c6e547995cfe3e199f8a51e to your computer and use it in GitHub Desktop.
Manually run a CircleCI build via the API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Run CircleCI builds manually using this script | |
# Most useful for when you have a workflow set up that doesn't execute on the branch that you are pushing to | |
export CIRCLE_TOKEN=YOUR_CIRCLE_TOKEN | |
export GIT_COMMIT_REVISION=YOUR_GIT_COMMIT_REVISION_TO_BUILD | |
export VSC=github | |
export VSC_ACCOUNT=YOUR_VSC_USERNAME | |
export VSC_REPO_NAME=YOUR_VSC_REPO_NAME | |
export VSC_REPO_BRANCH_NAME=YOUR_VSC_BRANCH_NAME | |
curl --user ${CIRCLE_TOKEN}:\ | |
--request POST\ | |
--form revision=GIT_COMMIT_REVISION\ | |
--form [email protected]\ | |
--form notify=false\ | |
https://circleci.com/api/v1.1/project/${VSC}/${VSC_ACCOUNT}/${VSC_REPO_NAME}/tree/${VSC_REPO_BRANCH_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment