Skip to content

Instantly share code, notes, and snippets.

@uzyexe
Created July 14, 2014 14:55
Show Gist options
  • Save uzyexe/d06587a9c3a54227c879 to your computer and use it in GitHub Desktop.
Save uzyexe/d06587a9c3a54227c879 to your computer and use it in GitHub Desktop.
towncrier-fixtures.sh
#!/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