diff --git a/ci-automation/image_changes.sh b/ci-automation/image_changes.sh index 85a1eb3a006..557dda743a2 100644 --- a/ci-automation/image_changes.sh +++ b/ci-automation/image_changes.sh @@ -51,6 +51,22 @@ function _image_changes_impl() { source sdk_container/.repo/manifests/version.txt local vernum="${FLATCAR_VERSION}" + MAJOR_B=$(echo "${FLATCAR_VERSION}" | cut -d . -f 1) + + if [ "${channel}" = "lts" ]; then + 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 [[ "${MAJOR_B}" = "${MAJOR}" ]]; then + SUFFIX="-${TUPLE[1]}" + break + fi + done