Esempio n. 1
0
 def upload_to_lookaside_cache(self, archive_path: str) -> None:
     """
     Upload files (archive) to the lookaside cache.
     """
     # TODO: can we check if the tarball is already uploaded so we don't have ot re-upload?
     logger.info("About to upload to lookaside cache.")
     f = FedPKG(fas_username=self.config.fas_user,
                directory=self.local_project.working_dir)
     try:
         f.new_sources(sources=archive_path)
     except Exception as ex:
         logger.error(
             f"The 'fedpkg new-sources' command failed for the following reason: {ex!r}"
         )
         raise PackitException(ex)
Esempio n. 2
0
 def upload_to_lookaside_cache(self, archive_path: str) -> None:
     """
     Upload files (archive) to the lookaside cache.
     """
     # TODO: can we check if the tarball is already uploaded so we don't have ot re-upload?
     logger.info("About to upload to lookaside cache")
     f = FedPKG(fas_username=self.fas_user, directory=self.local_project.working_dir)
     f.init_ticket(self.config.keytab_path)
     try:
         f.new_sources(sources=archive_path)
     except Exception as ex:
         logger.error(
             f"`fedpkg new-sources` failed for some reason. "
             f"Either Fedora kerberos is invalid or there could be network outage."
         )
         raise PackitException(ex)