def enrich_balrog_manifest(context, locale): release_props = context.release_props url_replacements = [] if release_props["branch"] in RELEASE_BRANCHES: url_replacements.append(['http://archive.mozilla.org/pub', 'http://download.cdn.mozilla.net/pub']) enrich_dict = { "appName": get_product_name(release_props['appName'], release_props['stage_platform']), "appVersion": release_props["appVersion"], "branch": release_props["branch"], "buildid": release_props["buildid"], "extVersion": release_props["appVersion"], "hashType": release_props["hashType"], "locale": locale if not locale == 'multi' else 'en-US', "platform": NORMALIZED_BALROG_PLATFORMS.get(release_props["stage_platform"], release_props["stage_platform"]), "url_replacements": url_replacements } if is_promotion_action(context.action) or is_release_action(context.action): enrich_dict["tc_release"] = True enrich_dict["build_number"] = context.task['payload']['build_number'] enrich_dict["version"] = context.task['payload']['version'] else: enrich_dict["tc_nightly"] = True return enrich_dict
def get_schema_key_by_action(context): action = get_task_action(context.task, context.config) if utils.is_release_action(action): return 'release_schema_file' elif utils.is_maven_action(action): return 'maven_schema_file' return 'schema_file'
def test_is_action_release_or_promotion(action, release, promotion): assert is_release_action(action) is release assert is_promotion_action(action) is promotion
def validate_task_schema(context): """Perform a schema validation check against taks definition""" action = get_task_action(context.task, context.config) schema_key = 'release_schema_file' if utils.is_release_action(action) else 'schema_file' client.validate_task_schema(context, schema_key=schema_key)