Skip to content

Instantly share code, notes, and snippets.

@stewartpark
Last active February 17, 2017 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stewartpark/439270d5aef86f4f50ce4068e953f23f to your computer and use it in GitHub Desktop.
Save stewartpark/439270d5aef86f4f50ce4068e953f23f to your computer and use it in GitHub Desktop.
Simple CircleCI Build Trigger
# This script is to trigger another CircleCI build inside a CircleCI build easily
# Author: Stewart Park <hello@stewartjpark.com>
#
# Usage:
# curl -L https://goo.gl/qU14Wd | PROJECT=username/repo-name API_TOKEN=create-one-on-circleci-config bash
set -e
# Install dependencies
sudo apt-get install jq
curl -o ~/bin/circleci https://raw.githubusercontent.com/rockymadden/circleci-cli/master/src/circleci
chmod 755 ~/bin/circleci
# Trigger the project
circleci init --token $API_TOKEN
circleci trigger $PROJECT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment