2019-07-23 05:12:33 -05:00
|
|
|
#!/bin/bash
|
2017-02-02 01:59:37 -06:00
|
|
|
|
|
|
|
_circle_token=$1
|
|
|
|
_grafana_version=$2
|
|
|
|
|
2019-07-23 05:12:33 -05:00
|
|
|
trigger_build_url="https://circleci.com/api/v1/project/grafana/grafana-docker/tree/master?circle-token=${_circle_token}"
|
2017-02-02 01:59:37 -06:00
|
|
|
|
|
|
|
post_data=$(cat <<EOF
|
|
|
|
{
|
|
|
|
"build_parameters": {
|
|
|
|
"GRAFANA_VERSION": "${_grafana_version}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
)
|
|
|
|
|
2019-07-23 05:12:33 -05:00
|
|
|
echo "${post_data}"
|
2017-02-02 01:59:37 -06:00
|
|
|
|
|
|
|
curl \
|
|
|
|
--header "Accept: application/json" \
|
|
|
|
--header "Content-Type: application/json" \
|
|
|
|
--data "${post_data}" \
|
2019-07-23 05:12:33 -05:00
|
|
|
--request POST "${trigger_build_url}"
|