1
0
mirror of https://github.com/rancher/os.git synced 2025-06-24 22:11:33 +00:00
os/scripts/ci
Sven Dowideit 223a7b49eb Add unversioned artifact files, and a basic ipxe script
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-12 02:37:25 +00:00

42 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#set -e
cd $(dirname $0)/..
echo BUILD
./scripts/build
echo TEST
./scripts/test
echo VALIDATE
./scripts/validate
echo PREPARE
./scripts/prepare
echo PACKAGE
./scripts/package
echo INTEGRATION-TEST
./scripts/integration-test
cat scripts/hosting/rancheros.ipxe | sed "s/latest/${VERSION}/g" > dist/artifacts/rancheros.ipxe
echo "github-release release --user rancher --repo os --tag ${VERSION} --pre-release --draft" > dist/publish.sh
chmod 755 dist/publish.sh
for file in $(ls dist/artifacts/); do
if [[ "$file" != *"installer.tar" ]]; then
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name ${file}" >> dist/publish.sh
fi
if [[ "$file" == "initrd-"* ]]; then
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name initrd" >> dist/publish.sh
fi
if [[ "$file" == "vmlinuz-"* ]]; then
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ./dist/artifacts/${file} --name vmlinuz" >> dist/publish.sh
fi
done
echo >> dist/publish.sh
cat dist/images | sed 's/^/docker push /' >> dist/publish.sh
echo "--- Run dist/publish.sh"
cat dist/publish.sh