netboot.xyz/script/message
Antony Messerli f628157e43 Fixing signatures and add certs to loaders
* Shifting after_deploy messages and aws invalidation to
  proper locations
* Add cert checkout to preinstall and setting those on s3
  deploys only
* Adding production docker file which runs netboot.xyz overrides
* Only display sig menus if enabled
* Fix var names for signing
2019-12-15 22:02:19 +00:00

43 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
set -e
TYPE=$1
if [ "${TYPE}" == "dev-push" ]; then
BOOT_URL="https://s3.amazonaws.com/${BUCKET_DEV}/${TRAVIS_COMMIT}/index.html"
elif [ "${TYPE}" == "rc-push" ]; then
BOOT_URL="https://staging.boot.netboot.xyz/$(cat version.txt)-RC/index.html"
elif [ "${TYPE}" == "live-push" ]; then
BOOT_URL="https://staging.boot.netboot.xyz/$(cat version.txt)/index.html"
fi
# send status to discord
if [ "${TYPE}" == "failure" ]; then
curl -X POST -H "Content-Type: application/json" --data \
'{
"avatar_url": "https://avatars.io/twitter/travisci",
"embeds": [
{
"color": 16711680,
"description": "__**Failed to Build**__ \n**Build:** '${TRAVIS_BUILD_WEB_URL}'\n**Status:** Failure\n**Change:** https://github.com/netbootxyz/netboot.xyz/commit/'${TRAVIS_COMMIT}'\n"
}
],
"username": "Travis CI"
}' \
${DISCORD_HOOK_URL}
else
curl -X POST -H "Content-Type: application/json" --data \
'{
"avatar_url": "https://avatars.io/twitter/travisci",
"embeds": [
{
"color": 1681177,
"description": "__**Boot Menu Published**__ \n**Files:** '${BOOT_URL}' \n**Build:** '${TRAVIS_BUILD_WEB_URL}'\n**Change:** https://github.com/netbootxyz/netboot.xyz/commit/'${TRAVIS_COMMIT}'\n"
}
],
"username": "Travis CI"
}' \
${DISCORD_HOOK_URL}
fi