Exemplo n.º 1
0
    def run(self):
        """
        Run the plugin.
        """

        self.session = get_koji_session(self.workflow)

        nvr_requests = [
            NvrRequest(**nvr_request) for nvr_request in
            util.read_fetch_artifacts_koji(self.workflow) or []
        ]
        pnc_requests = util.read_fetch_artifacts_pnc(self.workflow) or {}
        url_requests = util.read_fetch_artifacts_url(self.workflow) or []

        components = self.get_nvr_components(nvr_requests)
        pnc_build_metadata = self.get_pnc_build_metadata(pnc_requests)
        download_queue = self.process_url_requests(url_requests)
        remote_source_files = self.download_sources(download_queue)

        return {
            'components': components,
            'no_source': self.no_source_artifacts,
            'pnc_build_metadata': pnc_build_metadata,
            'remote_source_files': remote_source_files
        }
Exemplo n.º 2
0
    def run(self):
        self.session = get_koji_session(self.workflow)

        nvr_requests = [
            NvrRequest(**nvr_request) for nvr_request in
            util.read_fetch_artifacts_koji(self.workflow) or []
        ]
        url_requests = util.read_fetch_artifacts_url(self.workflow) or []

        download_queue = (self.process_by_nvr(nvr_requests) +
                          self.process_by_url(url_requests))

        self.download_files(download_queue)

        return download_queue
    def run(self):
        self.session = get_koji_session(self.workflow.conf)

        nvr_requests = [
            NvrRequest(**nvr_request) for nvr_request in
            util.read_fetch_artifacts_koji(self.workflow) or []
        ]
        pnc_requests = util.read_fetch_artifacts_pnc(self.workflow) or {}
        url_requests = util.read_fetch_artifacts_url(self.workflow) or []

        components, nvr_download_queue = self.process_by_nvr(nvr_requests)
        url_download_queue, source_download_queue = self.process_by_url(
            url_requests)
        pnc_artifact_ids, pnc_download_queue, pnc_build_metadata = self.process_pnc_requests(
            pnc_requests)

        download_queue = pnc_download_queue + nvr_download_queue + url_download_queue

        download_to_build_dir = functools.partial(self.download_files,
                                                  download_queue)
        self.workflow.build_dir.for_all_platforms_copy(download_to_build_dir)

        return {
            'components':
            components,
            'download_queue':
            [dataclasses.asdict(download) for download in download_queue],
            'no_source':
            self.no_source_artifacts,
            'pnc_artifact_ids':
            pnc_artifact_ids,
            'pnc_build_metadata':
            pnc_build_metadata,
            'source_download_queue':
            source_download_queue,
            'source_url_to_artifacts':
            self.source_url_to_artifacts,
        }
Exemplo n.º 4
0
 def validate_user_config_files(self):
     """Validate some user config files"""
     read_fetch_artifacts_koji(self.workflow)
     read_fetch_artifacts_pnc(self.workflow)
     read_fetch_artifacts_url(self.workflow)
     read_content_sets(self.workflow)