buildapi

This script is designed to trigger jobs through Release Engineering’s buildapi self-serve service.

The API documentation is in here (behind LDAP): https://secure.pub.build.mozilla.org/buildapi/self-serve

The docs can be found in here: http://moz-releng-buildapi.readthedocs.org

mozci.sources.buildapi.make_cancel_request(repo_name, request_id, dry_run=True)

Cancel a request using buildapi self-serve. Returns a request.

Buildapi documentation: DELETE /self-serve/{branch}/request/{request_id} Cancel the given request

mozci.sources.buildapi.make_retrigger_request(repo_name, request_id, count=1, priority=0, dry_run=True)

Retrigger a request using buildapi self-serve. Returns a request.

Buildapi documentation: POST /self-serve/{branch}/request Rebuild request_id, which must be passed in as a POST parameter. priority and count are also accepted as optional parameters. count defaults to 1, and represents the number of times this build will be rebuilt.

mozci.sources.buildapi.query_jobs_schedule(repo_name, revision)

Query Buildapi for jobs

mozci.sources.buildapi.query_jobs_url(repo_name, revision)

Return URL of where a developer can login to see the scheduled jobs for a revision.

mozci.sources.buildapi.query_repositories(clobber=False)

Return dictionary with information about the various repositories.

The data about a repository looks like this:

"ash": {
    "repo": "https://hg.mozilla.org/projects/ash",
    "graph_branches": ["Ash"],
    "repo_type": "hg"
}
mozci.sources.buildapi.query_repository(repo_name)

Return dictionary with information about a specific repository.

mozci.sources.buildapi.trigger_arbitrary_job(repo_name, builder, revision, files=[], dry_run=False, extra_properties=None)

Request buildapi to trigger a job for us.

We return the request or None if dry_run is True.

mozci.sources.buildapi.valid_credentials()

Verify that the user’s credentials are valid.