adding build logic pointed at netboot us-east buckets, semi loop tested

This commit is contained in:
thelamer 2019-11-18 21:53:06 -08:00
parent 530dce11a2
commit bc8bf983f5
5 changed files with 112 additions and 22 deletions

View file

@ -5,6 +5,12 @@ TYPE=$1
# Set boot domain
if [[ "${TYPE}" == "dev" ]]; then
BOOT_DOMAIN="${BUCKET_DEV}.s3-us-west-2.amazonaws.com/${TRAVIS_COMMIT}"
elif [[ "${TYPE}" == "pr" ]]; then
BOOT_DOMAIN="test.com"
elif [[ "${TYPE}" == "rc" ]]; then
BOOT_DOMAIN="boot.netboot.xyz/${TRAVIS_TAG}"
elif [[ "${TYPE}" == "release" ]]; then
BOOT_DOMAIN="boot.netboot.xyz/$(cat verion.txt)"
fi
sed -i \
"/^#boot_domain/c\boot_domain: ${BOOT_DOMAIN}" \
@ -26,3 +32,25 @@ tar -czf menus.tar.gz *
mv menus.tar.gz ../githubout
cd ..
# Latest style endpoints for RC and Live
if [[ "${TYPE}" == "release" ]] || [[ "${TYPE}" == "rc" ]]; then
rm -Rf buildout/
if [[ "${TYPE}" == "release" ]]; then
sed -i \
"/^boot_domain/c\boot_domain: boot.netboot.xyz" \
user_overrides.yml
docker build -t localbuild -f Dockerfile-build .
docker run --rm -it -v $(pwd):/buildout localbuild
fi
if [[ "${TYPE}" == "rc" ]]; then
sed -i \
"/^boot_domain/c\boot_domain: boot.netboot.xyz/rc" \
user_overrides.yml
docker build -t localbuild -f Dockerfile-build .
docker run --rm -it -v $(pwd):/buildout localbuild
fi
mkdir -p s3out-latest
cp -r buildout/* s3out-latest/
cp script/index.html s3out-latest/
fi

View file

@ -4,13 +4,13 @@
<title>Netboot.xyz BootLoaders</title>
</head>
<body>
<a href="ipxe/netboot.xyz.iso">netboot.xyz.iso</a>
<a href="ipxe/netboot.xyz-efi.iso">netboot.xyz-efi.iso</a>
<a href="ipxe/netboot.xyz.dsk">netboot.xyz.dsk</a>
<a href="ipxe/netboot.xyz.usb">netboot.xyz.usb</a>
<a href="ipxe/netboot.xyz.lkrn">netboot.xyz.lkrn</a>
<a href="ipxe/netboot.xyz.kpxe">netboot.xyz.kpxe</a>
<a href="ipxe/netboot.xyz-undionly.kpxe">netboot.xyz-undionly.kpxe</a>
<a href="ipxe/netboot.xyz.efi">netboot.xyz.efi</a>
<a href="ipxe/netboot.xyz.iso">netboot.xyz.iso</a><br>
<a href="ipxe/netboot.xyz-efi.iso">netboot.xyz-efi.iso</a><br>
<a href="ipxe/netboot.xyz.dsk">netboot.xyz.dsk</a><br>
<a href="ipxe/netboot.xyz.usb">netboot.xyz.usb</a><br>
<a href="ipxe/netboot.xyz.lkrn">netboot.xyz.lkrn</a><br>
<a href="ipxe/netboot.xyz.kpxe">netboot.xyz.kpxe</a><br>
<a href="ipxe/netboot.xyz-undionly.kpxe">netboot.xyz-undionly.kpxe</a><br>
<a href="ipxe/netboot.xyz.efi">netboot.xyz.efi</a><br>
</body>
</html>

View file

@ -3,9 +3,14 @@
TYPE=$1
if [ "${TYPE}" == "dev-push" ]; then
BOOT_URL="https://${BUCKET_DEV}.s3-us-west-2.amazonaws.com/${TRAVIS_COMMIT}/index.html"
BOOT_URL="https://${BUCKET_DEV}.s3-us-east-1.amazonaws.com/${TRAVIS_COMMIT}/index.html"
elif [ "${TYPE}" == "rc-push" ]; then
BOOT_URL="https://boot.netboot.xyz/${TRAVIS_TAG}/index.html"
elif [ "${TYPE}" == "live-push" ]; then
BOOT_URL="https://boot.netboot.xyz/$(cat version.txt)/index.html"
fi
# send status to discord
if [ "${TYPE}" == "failure" ]; then
curl -X POST --data \
@ -14,7 +19,7 @@ if [ "${TYPE}" == "failure" ]; then
"embeds": [
{
"color": 16711680,
"description": "__**Failed to Build**__ \n**Build:** '${TRAVIS_BUILD_WEB_URL}'\n**External Version:** '${EXTERNAL_VERSION}'\n**Status:** Failure\n**Change:** https://github.com/netbootxyz/netboot.xyz/commit/'${TRAVIS_COMMIT}'\n"
"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"
@ -27,7 +32,7 @@ else
"embeds": [
{
"color": 1681177,
"description": "__**Boot Menu Published**__ \n**Files:** '${BOOT_URL}' \n**Build:** '${TRAVIS_BUILD_WEB_URL}'\n**External Version:** '${EXTERNAL_VERSION}'\n**Change:** https://github.com/netbootxyz/netboot.xyz/commit/'${TRAVIS_COMMIT}'\n"
"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"

View file

@ -1,5 +1,4 @@
#!/bin/bash
# Install aws cli
pip install --user awscli tornado
sudo pip install awscli tornado