Created
October 24, 2017 04:50
-
-
Save toolmantim/146944ea39123ebee63c6f1b02c00a4e to your computer and use it in GitHub Desktop.
An example of using BlazeMeter with Buildkite
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 | |
# Creates a new Blazemeter test with the given BLAZEMETER_TEST_ID env var | |
# | |
# Requires BLAZEMETER_API_ID and BLAZEMETER_API_SECRET environment variables be | |
# setup on the agent as per: | |
# https://buildkite.com/docs/agent/securing#using-environment-hooks-for-secrets | |
set -euo pipefail | |
echo "~~~ Starting Backblaze test" | |
echo "Starting test ${BLAZEMETER_TEST_ID}..." | |
response=$( | |
curl -X POST \ | |
--include \ | |
-H "Content-Type: application/json" \ | |
--user "${BLAZEMETER_API_ID}:${BLAZEMETER_API_SECRET}" \ | |
"https://a.blazemeter.com:443/api/v4/tests/${BLAZEMETER_TEST_ID}/start" | |
) | |
echo "$response" | |
# Check for success and ensure the | |
echo "$response" | grep '"error": null' --silent |
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
steps: | |
- command: "blazemeter.sh" | |
label: ":blazemeter:" | |
artifact_paths: "" | |
env: | |
BLAZEMETER_TEST_ID: 5351050 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment