b2g_bumper module

b2g_bumper.py

Updates a gecko repo with up to date information from B2G repositories.

In particular, it updates gaia.json which is used by B2G desktop builds, and updates the XML manifests used by device builds.

This is to tie the external repository revisions to a visible gecko commit which appears on TBPL, so sheriffs can blame the appropriate changes.

class b2g_bumper.B2GBumper(require_config_file=True)[source]

Bases: mozharness.base.vcs.vcsbase.VCSScript, mozharness.mozilla.mapper.MapperMixin

build_commit_message(revision_list, repo_name, repo_url)[source]
bump_gaia()[source]
check_treestatus()[source]
checkout_gecko()[source]
checkout_manifests()[source]
commit_manifests()[source]
config_options = [[['--no-write'], {'dest': 'do_write', 'action': 'store_const', 'const': False, 'help': 'disable writing in-tree manifests'}], [['--device'], {'dest': 'device_override', 'help': 'specific device to process'}]]
delete_git_ref_cache()[source]

Used to delete the git ref cache from the file system. The cache can be used to persist git ls-remote lookup results, for example to reuse them between b2g bumper runs. Since the results are stale and do not get updated, the cache should be periodically deleted, so that the new refs can be fetched. The cache can also be used across branches/devices.

export_git_ref_cache()[source]

This action exports the git ref cache created during this run. This is useful for sharing the cache across multiple branches (for example).

filter_groups(device_config, manifest)[source]
filter_projects(device_config, manifest)[source]
get_revision_list(repo_config, prev_revision=None)[source]
hg_add(repo_path, path)[source]

Runs ‘hg add’ on path

hg_commit(repo_path, message)[source]

Commits changes in repo_path, with specified user and commit message

hg_push(repo_path)[source]
import_git_ref_cache()[source]

This action imports the git ref cache created during a previous run. This is useful for sharing the cache across multiple branches (for example).

map_remotes(manifest)[source]
massage_manifests()[source]

For each device in config[‘devices’], we’ll strip projects mentioned in ‘ignore_projects’, or that have group attribute mentioned in ‘filter_groups’. We’ll also map remote urls Finally, we’ll resolve absolute refs for projects that aren’t fully specified.

push()[source]
push_loop()[source]
query_abs_dirs()[source]
query_devices()[source]
query_gaia_git_rev()[source]

Returns (and caches) the git revision for gaia corresponding to the latest hg revision on our branch.

query_manifest(device_name)[source]
query_manifest_path(device)[source]
query_treestatus()[source]

Return True if we can land based on treestatus

resolve_git_ref(remote_url, revision)[source]
resolve_refs(manifest)[source]
update_gaia_json(path, hg_revision, hg_repo_path, git_revision, git_repo)[source]

Update path with repo_path + revision.

If the revision hasn’t changed, don’t do anything. If the repo_path changes or the current json is invalid, error but don’t fail.