Created
July 24, 2013 17:07
-
-
Save eizenberg/6072464 to your computer and use it in GitHub Desktop.
BigPanda deployments via shell script
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
#!/bin/sh | |
component='application1' | |
version='1.3.8' | |
host='ny-serv18' | |
owner='phil' | |
# --- Before Deployment | |
echo { \"component\": \"$component\", \"version\": \"$version\", \"hosts\": [ \"$host\" ], \"owner\": \"$owner\" } > deployment-start.json | |
curl -i -X POST -H "Authorization: Bearer <api-token>" -H "Content-Type: application/json" -d @deployment-start.json"https://api.bigpanda.io/data/events/deployments/start" | |
# ... deploy ... | |
# --- Deployment Succeeded | |
echo { \"component\": \"$component\", \"version\": \"$version\", \"hosts\": [ \"$host\" ], \"status\": \"success\" } > deployment-end.json | |
curl -i -X POST -H "Authorization: Bearer <api-token>" -H "Content-Type: application/json" -d @deployment-end.json"https://api.bigpanda.io/data/events/deployments/end" | |
# --- Deployment Failed | |
echo { \"component\": \"$component\", \"version\": \"$version\", \"hosts\": [ \"$host\" ], \"status\": \"failure\" } > deployment-end.json | |
curl -i -X POST -H "Authorization: Bearer <api-token>" -H "Content-Type: application/json" -d @deployment-end.json"https://api.bigpanda.io/data/events/deployments/end" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment