Created
July 14, 2014 14:55
-
-
Save uzyexe/d06587a9c3a54227c879 to your computer and use it in GitHub Desktop.
towncrier-fixtures.sh
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 | |
PORT=5000 | |
AUTH=admin:secret | |
# Create statuses | |
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/statuses -F name=Up -F description='The service is operating normally' -F icon=ok-sign | |
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/statuses -F name=Down -F description='The service is unavailable' -F icon=remove-sign | |
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/statuses -F name=Warning -F description='The service is operating in a degraded capacity' -F icon=warning-sign | |
# Make a group | |
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/groups -F name=Primary -F description='Primary services' | |
# And services | |
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/services -F name=first -F group=primary -F description='My website' -F order=10 | |
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/services -F name=second -F group=primary -F description='My website' -F order=30 | |
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/services -F name=third -F group=primary -F description='My website' -F order=20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment