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
6 changes: 5 additions & 1 deletion tmt/steps/prepare/artifact/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@ def fetch_contents(
raise tmt.utils.GeneralError(
f"Unexpected error downloading '{artifact}'."
) from error

if not downloaded_paths:
raise tmt.utils.GeneralError(
f"No artifacts were downloaded for provider '{self.raw_id}'. "
f"Verify the provider identifier is correct."
)
self.logger.info(f"Successfully downloaded '{len(downloaded_paths)}' artifacts.")
return downloaded_paths

Expand Down
11 changes: 8 additions & 3 deletions tmt/steps/prepare/artifact/providers/copr_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ def contribute_to_shared_repo(
shared_repo_dir: tmt.utils.Path,
exclude_patterns: Optional[list[tmt.utils.Pattern[str]]] = None,
) -> None:
guest.execute(
ShellScript(f"cp {quote(str(source_path))}/*.rpm {quote(str(shared_repo_dir))}")
)
try:
guest.execute(
ShellScript(f"cp {quote(str(source_path))}/*.rpm {quote(str(shared_repo_dir))}")
)
except Exception:
self.logger.warning(f"No artifacts to contribute from '{source_path}'.")
return
Comment thread
bajertom marked this conversation as resolved.

self.logger.info(f"Contributed artifacts from '{source_path}' to '{shared_repo_dir}'.")
11 changes: 8 additions & 3 deletions tmt/steps/prepare/artifact/providers/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ def contribute_to_shared_repo(
shared_repo_dir: tmt.utils.Path,
exclude_patterns: Optional[list[tmt.utils.Pattern[str]]] = None,
) -> None:
guest.execute(
ShellScript(f"cp {quote(str(source_path))}/*.rpm {quote(str(shared_repo_dir))}")
)
try:
guest.execute(
ShellScript(f"cp {quote(str(source_path))}/*.rpm {quote(str(shared_repo_dir))}")
)
except Exception:
self.logger.warning(f"No artifacts to contribute from '{source_path}'.")
return
Comment thread
bajertom marked this conversation as resolved.

self.logger.info(f"Contributed artifacts from '{source_path}' to '{shared_repo_dir}'.")
11 changes: 8 additions & 3 deletions tmt/steps/prepare/artifact/providers/koji.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,14 @@ def contribute_to_shared_repo(
shared_repo_dir: tmt.utils.Path,
exclude_patterns: Optional[list[tmt.utils.Pattern[str]]] = None,
) -> None:
guest.execute(
ShellScript(f"cp {quote(str(source_path))}/*.rpm {quote(str(shared_repo_dir))}")
)
try:
guest.execute(
ShellScript(f"cp {quote(str(source_path))}/*.rpm {quote(str(shared_repo_dir))}")
)
except Exception:
self.logger.warning(f"No artifacts to contribute from '{source_path}'.")
return

self.logger.info(f"Contributed artifacts from '{source_path}' to '{shared_repo_dir}'.")

def make_rpm_artifact(self, rpm_meta: dict[str, Any]) -> ArtifactInfo:
Expand Down
Loading