You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
running-data/create-chart

24 lines
492 B

#!/bin/bash
if [[ $# -ne 1 ]]; then
echo "Usage: ${0##} <chart json path>" >&2
exit 1
fi
if [[ -z "$API_URL" ]]; then
echo "Environment variable API_URL must be defined" >&2
exit 1
fi
if [[ -z "$AUTH_TOKEN" ]]; then
echo "Environment variable AUTH_TOKEN must be defined" >&2
exit 1
fi
chart_json_path=$1
set -x
curl -X POST "$API_URL/v3/charts" \
-H "Authorization:Bearer $AUTH_TOKEN" \
-H "Content-Type: application/json" \
--data "@$chart_json_path" | jq