Exemple #1
0
def generate_update_line(config, jobs):
    """Resolve fields that can be keyed by platform, etc."""
    release_config = get_release_config(config)
    for job in jobs:
        config_file = job.pop('whats-new-config')
        update_config = load_yaml(config_file)

        product = job['shipping-product']
        # XXX On ESR68, even though they get filtered, we're building balrog tasks with the new
        # Fennec numbers. This solution is not ideal, but works at the moment.
        version = FennecVersion.parse(release_config['appVersion'])
        if product == 'devedition':
            product = 'firefox'

        job['worker']['update-line'] = {}
        for blob_type, suffix in [('wnp', ''), ('no-wnp', '-No-WNP')]:
            context = {
                'release-type': config.params['release_type'],
                'product': product,
                'version': version,
                'blob-type': blob_type,
                'build-id': config.params['moz_build_date'],
            }
            job['worker']['update-line'][suffix] = generate_update_properties(
                context, update_config)

        yield job
Exemple #2
0
def test_update_properties(context, config_file, output_file):
    with DATA_PATH.joinpath(config_file).open("r", encoding="utf-8") as f:
        config = yaml_load(f)

    update_line = generate_update_properties(context, config)

    assert update_line == json.load(
        DATA_PATH.joinpath(output_file).open("r", encoding="utf-8"))
def generate_update_line(config, jobs):
    """Resolve fields that can be keyed by platform, etc."""
    release_config = get_release_config(config)
    for job in jobs:
        config_file = job.pop('whats-new-config')
        update_config = load_yaml(config_file)

        product = job['shipping-product']
        if product == 'devedition':
            product = 'firefox'
        job['worker']['update-line'] = {}
        for blob_type, suffix in [('wnp', ''), ('no-wnp', '-No-WNP')]:
            context = {
                'release-type': config.params['release_type'],
                'product': product,
                'version': GeckoVersion.parse(release_config['appVersion']),
                'blob-type': blob_type,
            }
            job['worker']['update-line'][suffix] = generate_update_properties(
                context, update_config)

        yield job
Exemple #4
0
def generate_update_line(config, jobs):
    """Resolve fields that can be keyed by platform, etc."""
    release_config = get_release_config(config)
    for job in jobs:
        config_file = job.pop("whats-new-config")
        update_config = load_yaml(config_file)

        product = job["shipping-product"]
        if product == "devedition":
            product = "firefox"
        job["worker"]["update-line"] = {}
        for blob_type, suffix in [("wnp", ""), ("no-wnp", "-No-WNP")]:
            context = {
                "release-type": config.params["release_type"],
                "product": product,
                "version": GeckoVersion.parse(release_config["appVersion"]),
                "blob-type": blob_type,
                "build-id": config.params["moz_build_date"],
            }
            job["worker"]["update-line"][suffix] = generate_update_properties(
                context, update_config
            )

        yield job