Created
July 31, 2019 21:00
-
-
Save sayadi/1d27149e3b09849ac1a291383f026f6a to your computer and use it in GitHub Desktop.
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
version: 2 | |
general: | |
branches: | |
only: | |
- dev | |
- staging | |
- prod | |
jobs: | |
build: | |
docker: | |
- image: spotify/alpine | |
steps: | |
- run: | |
name: Trigger the Build Job | |
command: | | |
printf "Setting up variables"# TODO Don't forget to put in your own values | |
ORGANIZATION=your_organization_name | |
PROJECT=your_project_name | |
BRANCH=$CIRCLE_BRANCH# BRANCH=desired_branch | |
printf "Triggering a(n) $PROJECT build on the $BRANCH branch\n\n" | |
BUILD_INFO=$(curl -X POST -H -d \ | |
"{}" \ | |
"https://circleci.com/api/v1/project/$ORGANIZATION/$PROJECT/tree/$CIRCLE_BRANCH?circle-token=$CIRCLE_TOKEN") | |
printf "\n\nBuild triggered\n\n"printf "Follow the progress of the build on \nhttps://circleci.com/gh/$ORGANIZATION/$PROJECT/tree/$CIRCLE_BRANCH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment