mirror of
https://github.com/rancher/os.git
synced 2025-08-06 17:24:16 +00:00
Update release scripts
1. also upload the artifacts to the github release page 2. add checksums for most artifacts
This commit is contained in:
parent
a462e3e518
commit
7f4f270129
43
scripts/checksums
Executable file
43
scripts/checksums
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cd $(dirname $0)/..
|
||||||
|
|
||||||
|
source ./scripts/version
|
||||||
|
|
||||||
|
CHECKSUM="dist/checksums.txt"
|
||||||
|
rm -f $CHECKSUM
|
||||||
|
|
||||||
|
FILELIST="
|
||||||
|
initrd
|
||||||
|
rancheros.ipxe
|
||||||
|
rancheros.iso
|
||||||
|
rootfs.tar.gz
|
||||||
|
vmlinuz
|
||||||
|
rancheros-aliyun.vhd
|
||||||
|
rancheros-cloudstack.img
|
||||||
|
rancheros-digitalocean.img
|
||||||
|
rancheros-openstack.img
|
||||||
|
rancheros-gce.tar.gz
|
||||||
|
rancheros-raspberry-pi64.zip
|
||||||
|
rancheros-4glte.iso
|
||||||
|
rancheros-hyperv.iso
|
||||||
|
rancheros-proxmoxve.iso
|
||||||
|
rancheros-proxmoxve-autoformat.iso
|
||||||
|
rancheros-vmware.iso
|
||||||
|
rancheros-vmware-autoformat.iso
|
||||||
|
"
|
||||||
|
|
||||||
|
rm -rf dist/checksums && mkdir -p dist/checksums
|
||||||
|
pushd dist/checksums
|
||||||
|
for file in $FILELIST; do
|
||||||
|
curl -sSL -o $file https://github.com/rancher/os/releases/download/$VERSION/$file
|
||||||
|
for algo in sha256 md5; do
|
||||||
|
echo "$algo: $(${algo}sum $file)" >> ../../$CHECKSUM
|
||||||
|
done
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file $CHECKSUM --name checksums.txt"
|
||||||
|
echo "gsutil cp $CHECKSUM gs://releases.rancher.com/os/latest/checksums.txt"
|
||||||
|
echo "gsutil cp $CHECKSUM gs://releases.rancher.com/os/$VERSION/checksums.txt"
|
@ -9,7 +9,6 @@ ARTIFACTS=$(pwd)/dist/artifacts
|
|||||||
CD=${BUILD}/cd
|
CD=${BUILD}/cd
|
||||||
rm -rf ${CD}/
|
rm -rf ${CD}/
|
||||||
ISO=${ARTIFACTS}/$(echo ${DISTRIB_ID} | tr '[:upper:]' '[:lower:]').iso
|
ISO=${ARTIFACTS}/$(echo ${DISTRIB_ID} | tr '[:upper:]' '[:lower:]').iso
|
||||||
CHECKSUM=iso-checksums.txt
|
|
||||||
|
|
||||||
mkdir -p ${CD}/boot/isolinux
|
mkdir -p ${CD}/boot/isolinux
|
||||||
mkdir -p ${CD}/rancheros
|
mkdir -p ${CD}/rancheros
|
||||||
@ -42,7 +41,3 @@ cd ${CD} && xorriso \
|
|||||||
-o $ISO ${CD}
|
-o $ISO ${CD}
|
||||||
|
|
||||||
cd $(dirname $ISO)
|
cd $(dirname $ISO)
|
||||||
rm -f $CHECKSUM
|
|
||||||
for algo in sha256 md5; do
|
|
||||||
echo "$algo: $(${algo}sum $(basename $ISO))" >> $CHECKSUM
|
|
||||||
done
|
|
||||||
|
@ -8,8 +8,8 @@ touch .make-4glte
|
|||||||
source ./scripts/version
|
source ./scripts/version
|
||||||
./scripts/release-build
|
./scripts/release-build
|
||||||
|
|
||||||
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
touch dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
chmod 755 dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
|
|
||||||
for file in $(ls dist/artifacts/); do
|
for file in $(ls dist/artifacts/); do
|
||||||
case $file in
|
case $file in
|
||||||
@ -23,3 +23,5 @@ for file in $(ls dist/artifacts/); do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-4glte.iso" > dist/publish.sh
|
||||||
|
@ -6,9 +6,6 @@ cd $(dirname $0)/..
|
|||||||
source ./scripts/version
|
source ./scripts/version
|
||||||
./scripts/release-build
|
./scripts/release-build
|
||||||
|
|
||||||
CHECKSUM="dist/checksums.txt"
|
|
||||||
rm -f $CHECKSUM
|
|
||||||
|
|
||||||
cat scripts/hosting/rancheros.ipxe | sed "s/latest/${VERSION}/g" > dist/artifacts/rancheros.ipxe
|
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
|
echo "github-release release --user rancher --repo os --tag ${VERSION} --pre-release --draft" > dist/publish.sh
|
||||||
@ -38,17 +35,7 @@ for file in $(ls dist/artifacts/); do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#checksums
|
|
||||||
pushd .
|
|
||||||
cd dist/artifacts
|
|
||||||
for algo in sha256 md5; do
|
|
||||||
echo "$algo: $(${algo}sum $file)" >> ../../$CHECKSUM
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
done
|
done
|
||||||
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/release.log --name release.log" >> dist/publish.sh
|
|
||||||
|
|
||||||
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file ${CHECKSUM} --name checksums.txt" >> dist/publish.sh
|
|
||||||
|
|
||||||
echo >> dist/publish.sh
|
echo >> dist/publish.sh
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ touch .make-hyperv
|
|||||||
source ./scripts/version
|
source ./scripts/version
|
||||||
./scripts/release-build
|
./scripts/release-build
|
||||||
|
|
||||||
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
touch dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
chmod 755 dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
|
|
||||||
for file in $(ls dist/artifacts/); do
|
for file in $(ls dist/artifacts/); do
|
||||||
case $file in
|
case $file in
|
||||||
@ -23,3 +23,5 @@ for file in $(ls dist/artifacts/); do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-hyperv.iso" > dist/publish.sh
|
||||||
|
@ -8,12 +8,13 @@ touch .make-proxmoxve
|
|||||||
source ./scripts/version
|
source ./scripts/version
|
||||||
./scripts/release-build
|
./scripts/release-build
|
||||||
|
|
||||||
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
touch dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
chmod 755 dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
|
|
||||||
if [ "$OS_AUTOFORMAT" = "true" ]; then
|
if [ "$OS_AUTOFORMAT" = "true" ]; then
|
||||||
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/proxmoxve/rancheros-autoformat.iso" >> ./dist/publish_gss_latest.sh
|
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/proxmoxve/rancheros-autoformat.iso" >> ./dist/publish_gss_latest.sh
|
||||||
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/proxmoxve/rancheros-autoformat.iso" >> ./dist/publish_gss_${VERSION}.sh
|
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/proxmoxve/rancheros-autoformat.iso" >> ./dist/publish_gss_${VERSION}.sh
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-proxmoxve-autoformat.iso" > dist/publish.sh
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -29,3 +30,5 @@ for file in $(ls dist/artifacts/); do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-proxmoxve.iso" > dist/publish.sh
|
||||||
|
@ -17,8 +17,9 @@ popd
|
|||||||
|
|
||||||
cp ./scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi64.zip ./dist/artifacts/
|
cp ./scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi64.zip ./dist/artifacts/
|
||||||
|
|
||||||
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
touch dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
chmod 755 dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
|
|
||||||
echo "gsutil cp dist/artifacts/rancheros-raspberry-pi64.zip gs://releases.rancher.com/os/latest/arm64/rancheros-raspberry-pi64.zip" >> ./dist/publish_gss_latest.sh
|
echo "gsutil cp dist/artifacts/rancheros-raspberry-pi64.zip gs://releases.rancher.com/os/latest/arm64/rancheros-raspberry-pi64.zip" >> ./dist/publish_gss_latest.sh
|
||||||
echo "gsutil cp dist/artifacts/rancheros-raspberry-pi64.zip gs://releases.rancher.com/os/${VERSION}/arm64/rancheros-raspberry-pi64.zip" >> ./dist/publish_gss_${VERSION}.sh
|
echo "gsutil cp dist/artifacts/rancheros-raspberry-pi64.zip gs://releases.rancher.com/os/${VERSION}/arm64/rancheros-raspberry-pi64.zip" >> ./dist/publish_gss_${VERSION}.sh
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros-raspberry-pi64.zip --name rancheros-raspberry-pi64.zip" > dist/publish.sh
|
||||||
|
@ -8,14 +8,16 @@ touch .make-vmware
|
|||||||
source ./scripts/version
|
source ./scripts/version
|
||||||
./scripts/release-build
|
./scripts/release-build
|
||||||
|
|
||||||
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
touch dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
chmod 755 dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
||||||
|
|
||||||
if [ "$OS_AUTOFORMAT" = "true" ]; then
|
if [ "$OS_AUTOFORMAT" = "true" ]; then
|
||||||
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_latest.sh
|
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_latest.sh
|
||||||
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_${VERSION}.sh
|
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_${VERSION}.sh
|
||||||
|
# In order to be compatible with early links, like /latest/rancheros-vmware.iso, I have to do this.
|
||||||
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/rancheros-vmware.iso" >> ./dist/publish_gss_latest.sh
|
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/rancheros-vmware.iso" >> ./dist/publish_gss_latest.sh
|
||||||
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/rancheros-vmware.iso" >> ./dist/publish_gss_${VERSION}.sh
|
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/rancheros-vmware.iso" >> ./dist/publish_gss_${VERSION}.sh
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-vmware-autoformat.iso" > dist/publish.sh
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -68,3 +70,5 @@ for file in $(ls dist/artifacts/); do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-vmware.iso" > dist/publish.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user