Verify token and url is set
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Torjus Håkestad 2022-01-10 13:51:50 +01:00
parent 34f9c49d54
commit afdf818fe3

View File

@ -1,5 +1,15 @@
#!/bin/sh #!/bin/sh
set -xe set -e
# TODO: Verify that variables are set properly # TODO: Verify that variables are set properly
if [ -z ${PLUGIN_GOTIFY_URL} ]; then
echo "PLUGIN_GOTIFY_URL is not set";
exit 1
fi
if [ -z ${PLUGIN_GOTIFY_TOKEN} ]; then
echo "PLUGIN_GOTIFY_TOKEN is not set";
exit 1
fi
curl "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5" curl "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5"