Example #1
0
def make_task_worker(config, jobs):
    for job in jobs:
        platform = job["attributes"]["build_platform"]
        locale = job["attributes"]["chunk_locales"]

        job["worker"] = {
            "implementation":
            "beetmover",
            "release-properties":
            craft_release_properties(config, job),
            "upstream-artifacts":
            generate_beetmover_upstream_artifacts(
                config,
                job,
                platform,
                locale,
            ),
            "artifact-map":
            generate_beetmover_artifact_map(config,
                                            job,
                                            platform=platform,
                                            locale=locale),
        }

        yield job
Example #2
0
def make_beetmover_checksums_worker(config, jobs):
    for job in jobs:
        valid_beetmover_job = len(job["dependencies"]) == 1
        if not valid_beetmover_job:
            raise NotImplementedError("Beetmover checksums must have one dependency.")

        locales = job["attributes"].get("chunk_locales")
        platform = job["attributes"]["build_platform"]

        refs = {
            "beetmover": None,
        }
        for dependency in job["dependencies"].keys():
            if dependency.startswith("release-beetmover"):
                refs["beetmover"] = f"<{dependency}>"
        if None in refs.values():
            raise NotImplementedError(
                "Beetmover checksums must have a beetmover dependency!"
            )

        worker = {
            "implementation": "beetmover",
            "release-properties": craft_release_properties(config, job),
            "upstream-artifacts": generate_beetmover_upstream_artifacts(
                config, job, platform, locales
            ),
            "artifact-map": generate_beetmover_artifact_map(
                config, job, platform=platform, locale=locales
            ),
        }

        job["worker"] = worker

        yield job
Example #3
0
def make_beetmover_checksums_worker(config, jobs):
    for job in jobs:
        valid_beetmover_job = len(job["dependencies"]) == 1
        if not valid_beetmover_job:
            raise NotImplementedError("Beetmover checksums must have one dependency.")

        refs = {
            "beetmover": None,
        }
        for dependency in job["dependencies"].keys():
            if dependency.endswith("beetmover"):
                refs["beetmover"] = f"<{dependency}>"
        if None in refs.values():
            raise NotImplementedError(
                "Beetmover checksums must have a beetmover dependency!"
            )

        worker = {
            "implementation": "beetmover",
            "release-properties": craft_release_properties(config, job),
            "upstream-artifacts": generate_upstream_artifacts(
                refs,
                job["extra"]["partner_path"],
            ),
            "partner-public": True,
        }

        job["worker"] = worker

        yield job
Example #4
0
def make_task_worker(config, jobs):
    for job in jobs:
        locale = job["attributes"].get("locale")
        platform = job["attributes"]["build_platform"]

        worker = {
            "implementation":
            "beetmover",
            "release-properties":
            craft_release_properties(config, job),
            "upstream-artifacts":
            generate_beetmover_upstream_artifacts(config, job, platform,
                                                  locale),
            "artifact-map":
            generate_beetmover_artifact_map(config,
                                            job,
                                            platform=platform,
                                            locale=locale),
        }

        if locale:
            worker["locale"] = locale
        job["worker"] = worker

        yield job
Example #5
0
def make_task_worker(config, jobs):
    for job in jobs:
        valid_beetmover_job = len(job["dependencies"]) == 2 and any(
            ["signing" in j for j in job["dependencies"]])
        if not valid_beetmover_job:
            raise NotImplementedError("Beetmover must have two dependencies.")

        platform = job["attributes"]["build_platform"]
        worker = {
            "implementation":
            "beetmover",
            "release-properties":
            craft_release_properties(config, job),
            "upstream-artifacts":
            generate_beetmover_upstream_artifacts(config,
                                                  job,
                                                  platform=None,
                                                  locale=None),
            "artifact-map":
            generate_beetmover_artifact_map(config, job, platform=platform),
        }

        job["worker"] = worker

        yield job
Example #6
0
def make_task_worker(config, jobs):
    for job in jobs:
        job["worker-type"] = "beetmover"
        worker = {
            "implementation": "beetmover",
            "release-properties": craft_release_properties(config, job),
            "partner-public": job["partner_public"],
        }
        job["worker"].update(worker)
        del job["partner_public"]

        yield job