diff --git a/test/bin/pyutils/build_bootc_images.py b/test/bin/pyutils/build_bootc_images.py index c2bf7ac31f..29be50272f 100644 --- a/test/bin/pyutils/build_bootc_images.py +++ b/test/bin/pyutils/build_bootc_images.py @@ -118,11 +118,17 @@ def set_rpm_version_info_vars(): FAKE_NEXT_MINOR_VERSION = str(int(MINOR_VERSION) + 1) SOURCE_VERSION_BASE = common.run_command_in_shell(f"rpm -q --queryformat '%{{version}}' {release_info_rpm_base}") + CURRENT_RELEASE_VERSION = "" + CURRENT_RELEASE_REPO = "" current_version_repo = common.run_command_in_shell(f"source {SCRIPTDIR}/get_rel_version_repo.sh; get_rel_version_repo {MINOR_VERSION}") - CURRENT_RELEASE_VERSION, CURRENT_RELEASE_REPO = current_version_repo.split(',') + if len(current_version_repo): + CURRENT_RELEASE_VERSION, CURRENT_RELEASE_REPO = current_version_repo.split(',') + PREVIOUS_RELEASE_VERSION = "" + PREVIOUS_RELEASE_REPO = "" previous_version_repo = common.run_command_in_shell(f"source {SCRIPTDIR}/get_rel_version_repo.sh; get_rel_version_repo {PREVIOUS_MINOR_VERSION}") - PREVIOUS_RELEASE_VERSION, PREVIOUS_RELEASE_REPO = previous_version_repo.split(',') + if len(previous_version_repo): + PREVIOUS_RELEASE_VERSION, PREVIOUS_RELEASE_REPO = previous_version_repo.split(',') RHOCP_MINOR_Y = "" RHOCP_MINOR_Y1 = "" diff --git a/test/bootc-sources/microshift_repo_config.sh.template b/test/bootc-sources/microshift_repo_config.sh.template index 855bd16454..4e29651e8a 100644 --- a/test/bootc-sources/microshift_repo_config.sh.template +++ b/test/bootc-sources/microshift_repo_config.sh.template @@ -33,6 +33,7 @@ EOF } config_centos9_repos() { + # The y-1 version repository is guaranteed to be available on the mirror cat > "${OCP_MIRROR_REPO_FILE}" < "${OCP_RHOCP_REPO_FILE}" <