mozci

This module is generally your starting point.

Instead of accessing directly a module that represents a data source (e.g. buildapi.py), we highly encourage you to use mozci.py instead which interfaces with them through. As the continuous integration changes, you will be better off letting mozci.py determine which source to reach to take the actions you need.

In here, you will also find high level functions that will do various low level interactions with distinct modules to meet your needs.

mozci.mozci.find_backfill_revlist(repo_url, revision, max_revisions, buildername)

Determine which revisions we need to trigger in order to backfill.

mozci.mozci.manual_backfill(revision, buildername, max_revisions, dry_run=False)

This function is used to trigger jobs for a range of revisions when a user clicks the backfill icon for a job on Treeherder.

It backfills to the last known job on Treeherder.

mozci.mozci.query_builders()

Return list of all builders.

mozci.mozci.query_repo_name_from_buildername(buildername, clobber=False)

Return the repository name from a given buildername.

mozci.mozci.query_repo_url_from_buildername(buildername)

Return the full repository URL for a given known buildername.

mozci.mozci.query_revisions_range(repo_name, from_revision, to_revision)

Return a list of revisions for that range.

mozci.mozci.set_query_source(query_source='buildapi')

Function to set the global QUERY_SOURCE

mozci.mozci.trigger(builder, revision, files=[], dry_run=False, extra_properties=None)

Helper to trigger a job.

Returns a request.

mozci.mozci.trigger_all_talos_jobs(repo_name, revision, times, dry_run=False)

Trigger talos jobs (excluding ‘pgo’) for a given revision.

mozci.mozci.trigger_job(revision, buildername, times=1, files=None, dry_run=False, extra_properties=None, trigger_build_if_missing=True)

Trigger a job through self-serve.

We return a list of all requests made.

mozci.mozci.trigger_missing_jobs_for_revision(repo_name, revision, dry_run=False)

Trigger missing jobs for a given revision. Jobs have any of (‘hg bundle’, ‘b2g’, ‘pgo’) in their buildername will not be triggered.

mozci.mozci.trigger_range(buildername, revisions, times=1, dry_run=False, files=None, extra_properties=None, trigger_build_if_missing=True)

Schedule the job named “buildername” (“times” times) in every revision on ‘revisions’.

mozci.mozci.valid_builder(buildername)

Determine if the builder you’re trying to trigger is valid.