Beispiel #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
Beispiel #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
Beispiel #3
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"]])
        # XXX release snap-repackage has a variable number of dependencies, depending on how many
        # "post-beetmover-dummy" jobs there are in the graph.
        if "-snap-" not in job["label"] and not valid_beetmover_job:
            raise NotImplementedError("Beetmover must have two dependencies.")

        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
Beispiel #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
Beispiel #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
def get_geckoview_upstream_artifacts(config, job, platform=""):
    if not platform:
        platform = job["attributes"]["build_platform"]
    upstream_artifacts = generate_beetmover_upstream_artifacts(
        config,
        job,
        platform="",
        **get_geckoview_template_vars(config, platform,
                                      job["attributes"].get("update-channel")),
    )
    return [{
        key: value
        for key, value in upstream_artifact.items() if key != "locale"
    } for upstream_artifact in upstream_artifacts]