DEPS: cipd, service_account, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/raw_io, recipe_engine/step
AuthutilApi allows generating OAuth2 tokens from locally stored secrets.
This is a thin wrapper over the authutil go executable, which itself calls https://github.com/luci/luci-go/blob/master/client/authcli/authcli.go
— def ensure_authutil(self, version=None):
— def get_token(self, account, scopes=None, lifetime_sec=None):
DEPS: service_account, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step
CIPDApi provides support for CIPD.
— def build(self, input_dir, output_package, package_name, install_mode=None):
— def create(self, pkg_def, refs=None, tags=None):
Creates a package based on YAML package definition file.
This builds and uploads the package in one step.
@property
— def default_bot_service_account_credentials(self):
— def describe(self, package_name, version, test_data_refs=None, test_data_tags=None):
— def ensure(self, root, packages):
Ensures that packages are installed in a given root dir.
packages must be a mapping from package name to its version, where
platform_suffix
),If installing a package requires credentials, call set_service_account_credentials
before calling this function.
— def platform_suffix(self):
Use to get full package name that is platform indepdent.
Example:
‘my/package/%s’ % api.cipd.platform_suffix() ‘my/package/linux-amd64’
— def register(self, package_name, package_path, refs=None, tags=None):
— def search(self, package_name, tag):
— def set_ref(self, package_name, version, refs):
— def set_service_account_credentials(self, path):
— def set_tag(self, package_name, version, tags):
DEPS: recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step
GitApi provides support for Git.
— def __call__(self, *args, **kwargs):
Return a git command step.
— def checkout(self, url, path=None, ref=None, remote=None, file=None, **kwargs):
Checkout a given ref and return the checked out revision.
— def get_hash(self, commit=‘HEAD’, **kwargs):
Find and return the hash of the given commit.
— def get_timestamp(self, commit=‘HEAD’, test_data=None, **kwargs):
Find and return the timestamp of the given commit.
— def rebase(self, branch=‘master’, remote=‘origin’, **kwargs):
Run rebase HEAD onto branch
DEPS: cipd, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step
GoApi provides support for Go.
— def __call__(self, *args, **kwargs):
Return a Go command step.
— def ensure_go(self, version=None):
Ensures that go distribution is installed.
@property
— def go_executable(self):
@property
— def go_root(self):
— def inline(self, program, add_go_log=True, **kwargs):
Run an inline Go program as a step. Program is output to a temp file and run when this step executes.
DEPS: cipd, service_account, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step
GomaApi contains helper functions for using goma.
@contextmanager
— def build_with_goma(self, env=None):
Make context wrapping goma start/stop.
Raises: StepFailure or InfraFailure if it fails to build.
— def ensure_goma(self, canary=False):
@property
— def goma_ctl(self):
@property
— def goma_dir(self):
@contextmanager
— def goma_env(self):
@property
— def json_path(self):
@property
— def recommended_goma_jobs(self):
Return the recommended number of jobs for parallel build using Goma.
This function caches the _goma_jobs.
@property
— def service_account_json_path(self):
— def start(self, env=None, **kwargs):
Start goma compiler_proxy.
A user MUST execute ensure_goma beforehand. It is user's responsibility to handle failure of starting compiler_proxy.
— def stop(self, **kwargs):
Stop goma compiler_proxy.
A user MUST execute start beforehand. It is user's responsibility to handle failure of stopping compiler_proxy.
Raises: StepFailure if it fails to stop goma.
DEPS: cipd, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/python, recipe_engine/step
GSUtilApi provides support for GSUtil.
— def __call__(self, *args, **kwargs):
Return a step to run arbitrary gsutil command.
— def copy(self, src_bucket, src, dst_bucket, dst, link_name=‘gsutil.copy’, unauthenticated_url=False, **kwargs):
— def ensure_gsutil(self, version=None):
@non_step
— def join(self, *parts):
Constructs a GS path from composite parts.
@non_step
— def normalize(self, url):
Normalize a GS URL using the gs:// URL prefix.
— def upload(self, bucket, src, dst, link_name=‘gsutil.upload’, unauthenticated_url=False, **kwargs):
DEPS: recipe_engine/path, recipe_engine/python, recipe_engine/raw_io
HashApi provides file hashing functionality.
— def md5(self, name, source, test_data=''):
— def sha1(self, name, source, test_data=''):
— def sha224(self, name, source, test_data=''):
— def sha256(self, name, source, test_data=''):
— def sha384(self, name, source, test_data=''):
— def sha512(self, name, source, test_data=''):
DEPS: cipd, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/raw_io, recipe_engine/step
JiriApi provides support for Jiri managed checkouts.
— def __call__(self, *args, **kwargs):
Return a jiri command step.
— def clean(self, all=False, **kwargs):
— def ensure_jiri(self, version=None):
— def import_manifest(self, manifest, remote, overwrite=False, **kwargs):
— def init(self, dir=None, **kwargs):
@property
— def jiri(self):
— def patch(self, ref, host=None, delete=False, force=False, rebase=False, **kwargs):
— def project(self, *projects, **kwargs):
— def snapshot(self, file, step_test_data=None, **kwargs):
— def update(self, gc=False, snapshot=None, local_manifest=False, **kwargs):
DEPS: cipd, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/python, recipe_engine/raw_io, recipe_engine/step
QemuApi provides support for QEMU.
@contextmanager
— def background_run(self, *args, **kwargs):
— def ensure_qemu(self, version=None):
— def qemu_executable(self, arch):
— def run(self, step_name, *args, **kwargs):
ServiceAccountApi provides access to service account keys.
— def get_json_path(self, account):
DEPS: cipd, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/python, recipe_engine/step
Provides steps to tar and untar files.
— def create(self, archive, compression=None):
Returns TarPackage object that can be used to compress a set of files.
— def ensure_tar(self, version=None):
Ensures that bsdtar is installed.
— def extract(self, step_name, archive, dir=None, verbose=False):
Step to uncompress |tar_file| file.
DEPS: authutil, recipe_engine/json, recipe_engine/platform, recipe_engine/properties
— def RunSteps(api, scopes, lifetime_sec):
DEPS: cipd, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/step
— def RunSteps(api):
DEPS: cipd, gsutil, jiri, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step, recipe_engine/tempfile
Recipe for building Clang toolchain.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, manifest, remote):
DEPS: jiri, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
Recipe for building and testing Cobalt.
— def RunSteps(api, patch_gerrit_url, patch_ref, manifest, remote):
DEPS: cipd, goma, gsutil, hash, jiri, qemu, tar, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
Recipe for building Fuchsia and running tests.
— def BuildFuchsia(api, release_build, target, gn_target, fuchsia_build_dir, modules, boot_module, tests, use_goma, gn_args):
— def BuildMagenta(api, target):
— def Checkout(api, patch_project, patch_ref, patch_gerrit_url, manifest, remote):
@contextmanager
— def GomaContext(api, use_goma):
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, manifest, remote, target, build_type, modules, boot_module, tests, use_goma, gn_args):
— def RunTests(api, target, fuchsia_build_dir, tests):
— def UploadArchive(api, target, magenta_build_dir, fuchsia_build_dir):
DEPS: git, recipe_engine/context, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
— def RunSteps(api):
DEPS: go, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
— def RunSteps(api):
DEPS: cipd, go, gsutil, jiri, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/step, recipe_engine/tempfile
Recipe for building Go toolchain.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, manifest, remote):
DEPS: goma, recipe_engine/platform, recipe_engine/properties, recipe_engine/step
— def RunSteps(api):
DEPS: gsutil, recipe_engine/path
— def RunSteps(api):
DEPS: hash, recipe_engine/path
— def RunSteps(api):
DEPS: cipd, git, go, gsutil, jiri, recipe_engine/context, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step, recipe_engine/time
Recipe for building Jiri.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, manifest, remote, target):
— def UploadPackage(api, revision, staging_dir):
DEPS: jiri, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
— def RunSteps(api):
DEPS: cipd, jiri, qemu, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step, recipe_engine/tempfile
Recipe for building Magenta.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, manifest, remote, target, toolchain, run_tests):
— def RunTests(api, name, *args, **kwargs):
DEPS: goma, jiri, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
Recipe for building and running pre-submit checks for the modules repo.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, project_path):
DEPS: cipd, gsutil, jiri, recipe_engine/context, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step, recipe_engine/tempfile
Recipe for building QEMU.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, manifest, remote):
DEPS: qemu, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
— def RunSteps(api, arch, kvm):
DEPS: jiri, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/python, recipe_engine/step
Recipe for testing Recipes.
— def RunSteps(api, patch_gerrit_url, patch_ref, manifest, remote):
DEPS: cipd, git, gsutil, tar, recipe_engine/file, recipe_engine/json, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step, recipe_engine/tempfile, recipe_engine/url
Recipe for building Rust toolchain.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url):
DEPS: cipd, go, goma, gsutil, hash, jiri, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step, recipe_engine/tempfile
Recipe for building Fuchsia SDKs.
— def BuildFuchsia(api, release_build, gn_target, fuchsia_build_dir, modules, use_goma, gn_args):
— def BuildMagenta(api, target):
@contextmanager
— def GomaContext(api, use_goma):
— def MakeSdk(api, outdir, sdk):
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, use_goma, gn_args):
— def UploadArchive(api, sdk):
— def UploadPackage(api, outdir, digest):
— def RunSteps(api):
DEPS: tar, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/platform, recipe_engine/step
— def RunSteps(api):
DEPS: jiri, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/raw_io, recipe_engine/step
Recipe for checking licenses in the repo hosting third-party Rust crates.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url):
DEPS: goma, gsutil, jiri, recipe_engine/context, recipe_engine/path, recipe_engine/properties, recipe_engine/step
Recipe for building WebView.
— def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref, patch_storage, patch_repository_url, manifest, remote, target):