diff --git a/ci-automation/vendor-testing/qemu_update.sh b/ci-automation/vendor-testing/qemu_update.sh index 1ce875f684..c9ea294461 100755 --- a/ci-automation/vendor-testing/qemu_update.sh +++ b/ci-automation/vendor-testing/qemu_update.sh @@ -35,7 +35,23 @@ if [ -f tmp/flatcar_production_image_previous.bin ] ; then else echo "++++ ${CIA_TESTSCRIPT}: downloading flatcar_production_image_previous.bin from previous ${CIA_CHANNEL} ++++" rm -f tmp/flatcar_production_image_previous.bin.bz2 - curl -fsSLO --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20 "https://${CIA_CHANNEL}.release.flatcar-linux.net/${CIA_ARCH}-usr/current/flatcar_production_image.bin.bz2" + SUFFIX='' + if [[ "${CIA_CHANNEL}" = 'lts' ]]; then + LINE='' + CURRENT_MAJOR="${CIA_VERNUM%%.*}" + curl -fsSLO --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20 'https://lts.release.flatcar-linux.net/lts-info' + while read -r LINE; do + # each line is major:year:(supported|unsupported) + TUPLE=(${LINE//:/ }) + MAJOR="${TUPLE[0]}" + if [[ "${CURRENT_MAJOR}" = "${MAJOR}" ]]; then + SUFFIX="-${TUPLE[1]}" + break + fi + done