Skip to content

Instantly share code, notes, and snippets.

@gleeb
Created November 21, 2017 12:38
Show Gist options
  • Save gleeb/c67aec8c5834b8f2e7cb8d3aab53fa38 to your computer and use it in GitHub Desktop.
Save gleeb/c67aec8c5834b8f2e7cb8d3aab53fa38 to your computer and use it in GitHub Desktop.
CircleCI build without commit
if [ $# -ne 4 ]; then
echo "usage: circle-build.sh <repository> <branch> <commit> <config-yml>"
exit 1;
fi
ORG=VATBox
API_TOKEN="42d8a7e3cd1ba3a4ae45eb38ec2e59bce74fb278"
REPO="$1"
BRANCH="$2"
GITHUB_COMMIT="$3"
CONFIG_YML="$4"
curl -XPOST --user ${API_TOKEN}:\
--form revision=${GITHUB_COMMIT}\
--form config=@${CONFIG_YML}\
"https://circleci.com/api/v1.1/project/github/${ORG}/${REPO}/tree/${BRANCH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment