drone-sentry-plugin/script.sh

20 lines
522 B
Bash
Raw Normal View History

2020-07-19 14:25:22 +02:00
#!/usr/bin/env sh
2020-07-19 13:25:51 +02:00
2020-07-19 13:44:10 +02:00
echo 'Updating Sentry Project: '${PLUGIN_SENTRY_PROJECT}
2020-07-19 13:25:51 +02:00
echo 'New Release: '${DRONE_REPO}':'${DRONE_COMMIT_SHA}
2020-07-19 13:44:10 +02:00
curl https://${PLUGIN_SENTRY_DOMAIN}/api/0/organizations/kmlabz/releases/ \
2020-07-19 13:25:51 +02:00
-X POST \
2020-07-19 13:44:10 +02:00
-H 'Authorization: Bearer '${PLUGIN_SENTRY_TOKEN} \
2020-07-19 13:25:51 +02:00
-H 'Content-Type: application/json' \
-d '
{
"version": "'${DRONE_BUILD_NUMBER}'",
"refs": [{
"repository":"'${DRONE_REPO}'",
"commit":"'${DRONE_COMMIT_SHA}'"
}],
2020-07-19 13:44:10 +02:00
"projects":["'${PLUGIN_SENTRY_PROJECT}'"]
2020-07-19 13:25:51 +02:00
}
2020-07-19 13:44:10 +02:00
'