Skip to content

Instantly share code, notes, and snippets.

@marineam
Created September 16, 2016 23:29
Show Gist options
  • Save marineam/980c56cf4f3512252d7181bf7d20fc95 to your computer and use it in GitHub Desktop.
Save marineam/980c56cf4f3512252d7181bf7d20fc95 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ex
KOLA=$(which kola)
PAYLOAD="$HOME/coreos/testupdates/update.gz"
CACHE_DIR="$HOME/coreos/testupdates/stable/"
STABLE_URL="https://stable.release.core-os.net/amd64-usr/"
STABLE_VERSIONS=(
367.1.0
410.2.0
444.5.0
494.5.0
522.6.0
557.2.0
607.0.0
633.1.0
647.2.0
681.2.0
717.3.0
723.3.0
766.5.0
899.17.0
1068.10.0
1122.2.0
)
for v in "${STABLE_VERSIONS[@]}"; do
dir="${CACHE_DIR}${v}"
img="${dir}/coreos_production_image.bin"
url="${STABLE_URL}${v}"
cork download-image --cache-dir="${dir}" --root="${url}" --platform=qemu
if [[ "${img}.bz2" -nt "${img}" ]]; then
lbunzip2 -k "${img}.bz2"
fi
sudo "${KOLA}" updatepayload --payload="${PAYLOAD}" --qemu-image="${img}" "$@"
echo "Upgrade from ${v} worked!"
done
echo "All upgrades worked!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment