From 280bb5179559720f2e6bbb8c387362eb676f289b Mon Sep 17 00:00:00 2001 From: John Noss Date: Fri, 27 Oct 2017 11:43:37 -0400 Subject: [PATCH] add curl to trigger placeholder prod deploy --- .circleci/config.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 46cd064..fe87ff8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,7 +63,7 @@ jobs: RETURN=$(curl -u ${CIRCLE_API_TOKEN}: \ --data build_parameters[CIRCLE_JOB]=deploy-dev \ --data build_parameters[IMAGE_TAG]=${IMAGE_TAG} \ - https://circleci.com/api/v1.1/project/github/FitnessKeeper/noss-circleci-test2/tree/deploy-dev) + https://circleci.com/api/v1.1/project/github/FitnessKeeper/noss-circleci-test2/tree/master) echo $RETURN | python3 -m json.tool BUILD_URL=$(echo $RETURN | python3 -c "import sys, json; print(json.load(sys.stdin)['build_url'])") echo "check ${BUILD_URL} for deploy status" @@ -103,8 +103,14 @@ jobs: echo "could not read image tag from workspace" exit 1 fi - echo "placeholder for deploying image: $IMAGE_TAG to production" - + echo "triggering circle ci build that would deploy image: ${IMAGE_TAG} to prod" + RETURN=$(curl -u ${CIRCLE_API_TOKEN}: \ + --data build_parameters[CIRCLE_JOB]=deploy-prod \ + --data build_parameters[IMAGE_TAG]=${IMAGE_TAG} \ + https://circleci.com/api/v1.1/project/github/FitnessKeeper/noss-circleci-test2/tree/master) + echo $RETURN | python3 -m json.tool + BUILD_URL=$(echo $RETURN | python3 -c "import sys, json; print(json.load(sys.stdin)['build_url'])") + echo "check ${BUILD_URL} for deploy status" workflows: version: 2