Created
November 16, 2018 08:21
-
-
Save kmccarth/2bc67e8db22c3caf00d61bb2d51172ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
# chmod a+x refreshDevApi.sh; | |
# ./refreshDevApi.sh; | |
# 1) get the latest prod data to the dev db | |
# 2) re-deploy dev api | |
# - kdm | |
# | |
# config | |
uname="YYYYY" | |
key="XXXXX" | |
# take prod snapshot. throttled to max 5 per Hour. data is sanitized | |
curl -X POST "https://$uname:[email protected]/job/MySQL%20Dump%20(Production)/build"; | |
# ... it takes about 40 seconds | |
sleep 40s | |
# re-seed dev db using snapshot | |
curl -X POST "https://$uname:[email protected]/job/MySQL%20Refresh%20Data%20(Development)/build"; | |
# deploy api code again (for migrations) | |
curl -X POST "https://$uname:[email protected]/job/API%20(Development)/build"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment