Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/tesar/dispatch/copr_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ def _get_correct_build_list():
)
LOGGER.critical(f"Exiting.")
sys.exit(99)
elif build_munch.state == "failed":
LOGGER.critical(
f"{FormatText.red+FormatText.bold}The build with the given ID failed!{FormatText.end}"
)
LOGGER.critical(
f"{FormatText.red+FormatText.bold}Please provide valid build ID.{FormatText.end}"
)
LOGGER.critical(f"{FormatText.red+FormatText.bold}Exiting.{FormatText.end}")
# elif build_munch.state == "failed":
# LOGGER.critical(
# f"{FormatText.red+FormatText.bold}The build with the given ID failed!{FormatText.end}"
# )
# LOGGER.critical(
# f"{FormatText.red+FormatText.bold}Please provide valid build ID.{FormatText.end}"
# )
# LOGGER.critical(f"{FormatText.red+FormatText.bold}Exiting.{FormatText.end}")
else:
build = build_munch
for build_info in get_build_dictionary(build, repository, package, composes):
Expand Down Expand Up @@ -159,20 +159,26 @@ def get_build_dictionary(
if ARGS.package == "leapp-repository":
source_release_raw = str(distro.split("to")[0])
target_release_raw = str(distro.split("to")[1])
source_release = f"{source_release_raw[0]}.{source_release_raw[1]}"
target_release = f"{target_release_raw[0]}.{target_release_raw[1]}"
source_release = ".".join((source_release_raw[0], source_release_raw[1:]))
target_release = ".".join((target_release_raw[0], target_release_raw[1:]))
copr_info_dict["compose"] = COMPOSE_MAPPING.get(distro).get("compose")
copr_info_dict["distro"] = COMPOSE_MAPPING.get(distro).get("distro")
copr_info_dict["source_release"] = source_release
copr_info_dict["target_release"] = target_release
for chroot in build.chroots:
if COMPOSE_MAPPING.get(distro).get("chroot") == chroot:
requested_chroot = COMPOSE_MAPPING.get(distro).get("chroot")
if requested_chroot == chroot:
copr_info_dict["chroot"] = COMPOSE_MAPPING.get(distro).get("chroot")
copr_info_dict["build_id"] = f"{build.id}:{chroot}"
LOGGER.info(
f"Assigning copr build id {build.id} for testing on {copr_info_dict['compose']} to test batch."
)

build_info.append(copr_info_dict)
if not build_info:
LOGGER.critical(
f"There is not an available build for the requested chroot: {requested_chroot}"
)
sys.exit(99)

return build_info
6 changes: 3 additions & 3 deletions src/tesar/dispatch/dispatch_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"distro": "rhel-8.7",
"chroot": "epel-8-x86_64",
},
"88to92": {
"compose": "RHEL-8.8.0-Nightly",
"distro": "rhel-8.8",
"810to95": {
"compose": "RHEL-8.10.0-Nightly",
"distro": "rhel-8.10",
"chroot": "epel-8-x86_64",
},
}
Expand Down