webhooks/webhook-amogusspecialsauce.sh hinzugefügt
This commit is contained in:
parent
76fe832e66
commit
5cfb93302c
1 changed files with 45 additions and 0 deletions
45
webhooks/webhook-amogusspecialsauce.sh
Normal file
45
webhooks/webhook-amogusspecialsauce.sh
Normal file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script for webhook artifacts from build-env
|
||||
|
||||
# Needs following env:
|
||||
|
||||
# DRONE_COMMIT_SHA
|
||||
# DRONE_TAG
|
||||
# WEBHOOK_URL
|
||||
|
||||
if [[ -n "${DRONE_TAG}" ]]; then
|
||||
message=$(cat <<EOF
|
||||
{
|
||||
"content": null,
|
||||
"embeds": [
|
||||
{
|
||||
"title": "CI-Status AmogusSpecialSauce (prod-build)",
|
||||
"description": "Download artifacts (valid 90D from now):\nhttps://s3.hackmi.ch/amogusspecialsauce/releases/compiled-${DRONE_TAG}.zip",
|
||||
"color": 65321
|
||||
}
|
||||
],
|
||||
"attachments": []
|
||||
}
|
||||
EOF
|
||||
)
|
||||
elif [[ -n "${DRONE_COMMIT_SHA}" ]]; then
|
||||
message=$(cat <<EOF
|
||||
{
|
||||
"content": null,
|
||||
"embeds": [
|
||||
{
|
||||
"title": "CI-Status AmogusSpecialSauce (main-build)",
|
||||
"description": "Download artifacts (valid 90D from now):\nhttps://s3.hackmi.ch/amogusspecialsauce/b/main/compiled-${DRONE_COMMIT_SHA:0:10}.zip",
|
||||
"color": 65321
|
||||
}
|
||||
],
|
||||
"attachments": []
|
||||
}
|
||||
EOF
|
||||
)
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -d "${message}" -H "Content-Type: application/json" "${WEBHOOK_URL}"
|
Loading…
Reference in a new issue