From c4085fb92906c284bc9819b95a013c856b128693 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Sat, 7 Nov 2020 20:40:06 -0800 Subject: [PATCH] Updating deploy script for Jenkins --- deploy-production.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/deploy-production.sh b/deploy-production.sh index b6fd060..9dc4a9f 100755 --- a/deploy-production.sh +++ b/deploy-production.sh @@ -3,15 +3,20 @@ #!/bin/bash #echo $DEPLOY_SECRET -echo "Deploy to production...." +if [ $GIT_BRANCH == master ] + then -export DATA="{\"ref\":\"$DEPLOY_SECRET\"}" + echo "Deploying to production...." -#echo $DATA + export DATA="{\"ref\":\"$DEPLOY_SECRET\"}" -curl -X POST http://fullstack.cash:9000/hooks/bch-api-mainnet -H "Content-Type: application/json" -d $DATA -curl -X POST http://fullstack.cash:9000/hooks/bch-api-testnet -H "Content-Type: application/json" -d $DATA -curl -X POST http://$FREE_SERVER:9000/hooks/bch-api-testnet -H "Content-Type: application/json" -d $DATA -curl -X POST http://$FREE_SERVER:9000/hooks/bch-api-mainnet -H "Content-Type: application/json" -d $DATA + #echo $DATA -echo "...Finished deploying to production." + curl -X POST http://fullstack.cash:9000/hooks/bch-api-mainnet -H "Content-Type: application/json" -d $DATA + curl -X POST http://fullstack.cash:9000/hooks/bch-api-testnet -H "Content-Type: application/json" -d $DATA + curl -X POST http://$FREE_SERVER:9000/hooks/bch-api-testnet -H "Content-Type: application/json" -d $DATA + curl -X POST http://$FREE_SERVER:9000/hooks/bch-api-mainnet -H "Content-Type: application/json" -d $DATA + + echo "...Finished deploying to production." + +fi