Generate initial recipes README.
Tbr: dnj@chromium.org Bug: Change-Id: Icc87cb23571341835e54cc80210fa23bc33fb1f0 Reviewed-on: https://chromium-review.googlesource.com/558382 Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Commit-Queue: Robbie Iannucci <iannucci@chromium.org>changes/82/558382/3
parent
603545b7ae
commit
54adb2a31c
@ -0,0 +1,801 @@
|
||||
<!--- AUTOGENERATED BY `./recipes.py test train` -->
|
||||
# Package documentation for [depot\_tools](https://chromium.googlesource.com/chromium/tools/depot_tools.git)
|
||||
## Table of Contents
|
||||
|
||||
**[Recipe Modules](#Recipe-Modules)**
|
||||
* [bot_update](#recipe_modules-bot_update) — Recipe module to ensure a checkout is consistent on a bot.
|
||||
* [cipd](#recipe_modules-cipd)
|
||||
* [depot_tools](#recipe_modules-depot_tools)
|
||||
* [gclient](#recipe_modules-gclient)
|
||||
* [gerrit](#recipe_modules-gerrit)
|
||||
* [git](#recipe_modules-git)
|
||||
* [git_cl](#recipe_modules-git_cl)
|
||||
* [gitiles](#recipe_modules-gitiles)
|
||||
* [gsutil](#recipe_modules-gsutil)
|
||||
* [infra_paths](#recipe_modules-infra_paths)
|
||||
* [presubmit](#recipe_modules-presubmit)
|
||||
* [rietveld](#recipe_modules-rietveld)
|
||||
* [tryserver](#recipe_modules-tryserver)
|
||||
|
||||
**[Recipes](#Recipes)**
|
||||
* [bot_update:examples/full](#recipes-bot_update_examples_full)
|
||||
* [cipd:examples/full](#recipes-cipd_examples_full)
|
||||
* [depot_tools:examples/full](#recipes-depot_tools_examples_full)
|
||||
* [gclient:examples/full](#recipes-gclient_examples_full)
|
||||
* [gclient:tests/patch_project](#recipes-gclient_tests_patch_project)
|
||||
* [gerrit:examples/full](#recipes-gerrit_examples_full)
|
||||
* [git:examples/full](#recipes-git_examples_full)
|
||||
* [git_cl:examples/full](#recipes-git_cl_examples_full)
|
||||
* [gitiles:examples/full](#recipes-gitiles_examples_full)
|
||||
* [gsutil:examples/full](#recipes-gsutil_examples_full)
|
||||
* [infra_paths:examples/full](#recipes-infra_paths_examples_full)
|
||||
* [presubmit:examples/full](#recipes-presubmit_examples_full)
|
||||
* [rietveld:examples/full](#recipes-rietveld_examples_full)
|
||||
* [tryserver:examples/full](#recipes-tryserver_examples_full)
|
||||
## Recipe Modules
|
||||
|
||||
### *recipe_modules* / [bot\_update](/recipes/recipe_modules/bot_update)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/bot_update/__init__.py#1): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [json](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--json), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [depot_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [rietveld](#recipe_modules-rietveld), [tryserver](#recipe_modules-tryserver)
|
||||
|
||||
Recipe module to ensure a checkout is consistent on a bot.
|
||||
|
||||
#### **class [BotUpdateApi](/recipes/recipe_modules/bot_update/api.py#11)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [\_\_call\_\_](/recipes/recipe_modules/bot_update/api.py#31)(self, name, cmd, \*\*kwargs):**
|
||||
|
||||
Wrapper for easy calling of bot_update.
|
||||
|
||||
— **def [\_\_init\_\_](/recipes/recipe_modules/bot_update/api.py#13)(self, issue, patch_issue, patchset, patch_set, patch_project, repository, patch_repository_url, gerrit_ref, patch_ref, patch_gerrit_url, rietveld, revision, parent_got_revision, deps_revision_overrides, fail_patch, \*args, \*\*kwargs):**
|
||||
|
||||
— **def [apply\_gerrit\_ref](/recipes/recipe_modules/bot_update/api.py#49)(self, root, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, \*\*kwargs):**
|
||||
|
||||
— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#384)(self, bot_update_step):**
|
||||
|
||||
Deapplies a patch, taking care of DEPS and solution revisions properly.
|
||||
|
||||
|
||||
— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#69)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, no_shallow=False, with_branch_heads=False, with_tags=False, refs=None, patch_oauth2=False, oauth2_json=False, use_site_config_creds=True, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, disable_syntax_validation=False, \*\*kwargs):**
|
||||
|
||||
Args:
|
||||
use_site_config_creds: If the oauth2 credentials are in the buildbot
|
||||
site_config. See crbug.com/624212 for more information.
|
||||
gclient_config: The gclient configuration to use when running bot_update.
|
||||
If omitted, the current gclient configuration is used.
|
||||
rietveld: The rietveld server to use. If omitted, will infer from
|
||||
the 'rietveld' property.
|
||||
issue: The rietveld issue number to use. If omitted, will infer from
|
||||
the 'issue' property.
|
||||
patchset: The rietveld issue patchset to use. If omitted, will infer from
|
||||
the 'patchset' property.
|
||||
disable_syntax_validation: (legacy) Disables syntax validation for DEPS.
|
||||
Needed as migration paths for recipes dealing with older revisions,
|
||||
such as bisect.
|
||||
|
||||
— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#361)(self, project_name, gclient_config=None):**
|
||||
|
||||
Returns all property names used for storing the checked-out revision of
|
||||
a given project.
|
||||
|
||||
Args:
|
||||
project_name (str): The name of a checked-out project as deps path, e.g.
|
||||
src or src/v8.
|
||||
gclient_config: The gclient configuration to use. If omitted, the current
|
||||
gclient configuration is used.
|
||||
|
||||
Returns (list of str): All properties that'll hold the checked-out revision
|
||||
of the given project. An empty list if no such properties exist.
|
||||
|
||||
  **@property**<br>— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#43)(self):**
|
||||
### *recipe_modules* / [cipd](/recipes/recipe_modules/cipd)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/cipd/__init__.py#1): [json](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--json), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [infra_paths](#recipe_modules-infra_paths)
|
||||
|
||||
#### **class [CIPDApi](/recipes/recipe_modules/cipd/api.py#148)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
CIPDApi provides basic support for CIPD.
|
||||
|
||||
This assumes that `cipd` (or `cipd.exe` or `cipd.bat` on windows) has been
|
||||
installed somewhere in $PATH. This will be true if you use depot_tools, or if
|
||||
your recipe is running inside of chrome-infrastructure's systems (buildbot,
|
||||
swarming).
|
||||
|
||||
— **def [build](/recipes/recipe_modules/cipd/api.py#193)(self, input_dir, output_package, package_name, install_mode=None):**
|
||||
|
||||
Builds, but does not upload, a cipd package from a directory.
|
||||
|
||||
Args:
|
||||
input_dir (Path) - the directory to build the package from.
|
||||
output_package (Path) - the file to write the package to.
|
||||
package_name (str) - the name of the cipd package as it would appear when
|
||||
uploaded to the cipd package server.
|
||||
install_mode (None|'copy'|'symlink') - the mechanism that the cipd client
|
||||
should use when installing this package. If None, defaults to the
|
||||
platform default ('copy' on windows, 'symlink' on everything else).
|
||||
|
||||
— **def [create\_from\_pkg](/recipes/recipe_modules/cipd/api.py#289)(self, pkg_def, refs=None, tags=None):**
|
||||
|
||||
Builds and uploads a package based on a PackageDefinition object.
|
||||
|
||||
This builds and uploads the package in one step.
|
||||
|
||||
Args:
|
||||
pkg_def (PackageDefinition) - The description of the package we want to
|
||||
create.
|
||||
refs (list(str)) - A list of ref names to set for the package instance.
|
||||
tags (dict(str, str)) - A map of tag name -> value to set for the package
|
||||
instance.
|
||||
|
||||
Returns the JSON 'result' section, e.g.: {
|
||||
"package": "infra/tools/cipd/android-amd64",
|
||||
"instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4"
|
||||
}
|
||||
|
||||
— **def [create\_from\_yaml](/recipes/recipe_modules/cipd/api.py#269)(self, pkg_def, refs=None, tags=None):**
|
||||
|
||||
Builds and uploads a package based on on-disk YAML package definition
|
||||
file.
|
||||
|
||||
This builds and uploads the package in one step.
|
||||
|
||||
Args:
|
||||
pkg_def (Path) - The path to the yaml file.
|
||||
refs (list(str)) - A list of ref names to set for the package instance.
|
||||
tags (dict(str, str)) - A map of tag name -> value to set for the package
|
||||
instance.
|
||||
|
||||
Returns the JSON 'result' section, e.g.: {
|
||||
"package": "infra/tools/cipd/android-amd64",
|
||||
"instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4"
|
||||
}
|
||||
|
||||
  **@property**<br>— **def [default\_bot\_service\_account\_credentials](/recipes/recipe_modules/cipd/api.py#169)(self):**
|
||||
|
||||
— **def [describe](/recipes/recipe_modules/cipd/api.py#396)(self, package_name, version, test_data_refs=None, test_data_tags=None):**
|
||||
|
||||
— **def [ensure](/recipes/recipe_modules/cipd/api.py#311)(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
|
||||
* name must be for right platform (see also ``platform_suffix``),
|
||||
* version could be either instance_id, or ref, or unique tag.
|
||||
|
||||
If installing a package requires credentials, call
|
||||
``set_service_account_credentials`` before calling this function.
|
||||
|
||||
  **@property**<br>— **def [executable](/recipes/recipe_modules/cipd/api.py#165)(self):**
|
||||
|
||||
— **def [initialize](/recipes/recipe_modules/cipd/api.py#159)(self):**
|
||||
|
||||
— **def [platform\_suffix](/recipes/recipe_modules/cipd/api.py#178)(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](/recipes/recipe_modules/cipd/api.py#221)(self, package_name, package_path, refs=None, tags=None):**
|
||||
|
||||
— **def [search](/recipes/recipe_modules/cipd/api.py#378)(self, package_name, tag):**
|
||||
|
||||
— **def [set\_ref](/recipes/recipe_modules/cipd/api.py#358)(self, package_name, version, refs):**
|
||||
|
||||
— **def [set\_service\_account\_credentials](/recipes/recipe_modules/cipd/api.py#162)(self, path):**
|
||||
|
||||
— **def [set\_tag](/recipes/recipe_modules/cipd/api.py#338)(self, package_name, version, tags):**
|
||||
### *recipe_modules* / [depot\_tools](/recipes/recipe_modules/depot_tools)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/depot_tools/__init__.py#1): [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform)
|
||||
|
||||
#### **class [DepotToolsApi](/recipes/recipe_modules/depot_tools/api.py#7)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
  **@property**<br>— **def [cros\_path](/recipes/recipe_modules/depot_tools/api.py#21)(self):**
|
||||
|
||||
  **@property**<br>— **def [download\_from\_google\_storage\_path](/recipes/recipe_modules/depot_tools/api.py#8)(self):**
|
||||
|
||||
  **@property**<br>— **def [gn\_py\_path](/recipes/recipe_modules/depot_tools/api.py#25)(self):**
|
||||
|
||||
  **@property**<br>— **def [gsutil\_py\_path](/recipes/recipe_modules/depot_tools/api.py#31)(self):**
|
||||
|
||||
  **@property**<br>— **def [ninja\_path](/recipes/recipe_modules/depot_tools/api.py#35)(self):**
|
||||
|
||||
  **@property**<br>— **def [presubmit\_support\_py\_path](/recipes/recipe_modules/depot_tools/api.py#40)(self):**
|
||||
|
||||
  **@property**<br>— **def [root](/recipes/recipe_modules/depot_tools/api.py#16)(self):**
|
||||
|
||||
Returns (Path): The "depot_tools" root directory.
|
||||
|
||||
  **@property**<br>— **def [upload\_to\_google\_storage\_path](/recipes/recipe_modules/depot_tools/api.py#12)(self):**
|
||||
### *recipe_modules* / [gclient](/recipes/recipe_modules/gclient)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gclient/__init__.py#1): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [json](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--json), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [infra_paths](#recipe_modules-infra_paths), [tryserver](#recipe_modules-tryserver)
|
||||
|
||||
#### **class [GclientApi](/recipes/recipe_modules/gclient/api.py#65)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [\_\_call\_\_](/recipes/recipe_modules/gclient/api.py#75)(self, name, cmd, infra_step=True, \*\*kwargs):**
|
||||
|
||||
Wrapper for easy calling of gclient steps.
|
||||
|
||||
— **def [\_\_init\_\_](/recipes/recipe_modules/gclient/api.py#70)(self, \*\*kwargs):**
|
||||
|
||||
— **def [break\_locks](/recipes/recipe_modules/gclient/api.py#287)(self):**
|
||||
|
||||
Remove all index.lock files. If a previous run of git crashed, bot was
|
||||
reset, etc... we might end up with leftover index.lock files.
|
||||
|
||||
— **def [calculate\_patch\_root](/recipes/recipe_modules/gclient/api.py#309)(self, patch_project, gclient_config=None):**
|
||||
|
||||
Returns path where a patch should be applied to based patch_project.
|
||||
|
||||
Maps "patch_project" to a path of directories relative to checkout's root,
|
||||
which describe where to place the patch.
|
||||
|
||||
For now, considers only first solution (c.solutions[0]), but in theory can
|
||||
be extended to all of them.
|
||||
|
||||
See patch_projects solution config property.
|
||||
|
||||
Returns:
|
||||
Relative path, including solution's root.
|
||||
If patch_project is not given or not recognized, it'll be just first
|
||||
solution root.
|
||||
|
||||
— **def [checkout](/recipes/recipe_modules/gclient/api.py#233)(self, gclient_config=None, revert=RevertOnTryserver, inject_parent_got_revision=True, with_branch_heads=False, \*\*kwargs):**
|
||||
|
||||
Return a step generator function for gclient checkouts.
|
||||
|
||||
  **@staticmethod**<br>— **def [config\_to\_pythonish](/recipes/recipe_modules/gclient/api.py#125)(cfg):**
|
||||
|
||||
— **def [get\_config\_defaults](/recipes/recipe_modules/gclient/api.py#119)(self):**
|
||||
|
||||
  **@staticmethod**<br>— **def [got\_revision\_reverse\_mapping](/recipes/recipe_modules/gclient/api.py#130)(cfg):**
|
||||
|
||||
Returns the merged got_revision_reverse_mapping.
|
||||
|
||||
Returns (dict): A mapping from property name -> project name. It merges the
|
||||
values of the deprecated got_revision_mapping and the new
|
||||
got_revision_reverse_mapping.
|
||||
|
||||
— **def [inject\_parent\_got\_revision](/recipes/recipe_modules/gclient/api.py#208)(self, gclient_config=None, override=False):**
|
||||
|
||||
Match gclient config to build revisions obtained from build_properties.
|
||||
|
||||
Args:
|
||||
gclient_config (gclient config object) - The config to manipulate. A value
|
||||
of None manipulates the module's built-in config (self.c).
|
||||
override (bool) - If True, will forcibly set revision and custom_vars
|
||||
even if the config already contains values for them.
|
||||
|
||||
  **@property**<br>— **def [is\_blink\_mode](/recipes/recipe_modules/gclient/api.py#274)(self):**
|
||||
|
||||
Indicates wether the caller is to use the Blink config rather than the
|
||||
Chromium config. This may happen for one of two reasons:
|
||||
1. The builder is configured to always use TOT Blink. (factory property
|
||||
top_of_tree_blink=True)
|
||||
2. A try job comes in that applies to the Blink tree. (patch_project is
|
||||
blink)
|
||||
|
||||
— **def [resolve\_revision](/recipes/recipe_modules/gclient/api.py#147)(self, revision):**
|
||||
|
||||
— **def [runhooks](/recipes/recipe_modules/gclient/api.py#268)(self, args=None, name='runhooks', \*\*kwargs):**
|
||||
|
||||
— **def [set\_patch\_project\_revision](/recipes/recipe_modules/gclient/api.py#336)(self, patch_project, gclient_config=None):**
|
||||
|
||||
Updates config revision corresponding to patch_project.
|
||||
|
||||
Useful for bot_update only, as this is the only consumer of gclient's config
|
||||
revision map. This doesn't overwrite the revision if it was already set.
|
||||
|
||||
  **@spec_alias.deleter**<br>— **def [spec\_alias](/recipes/recipe_modules/gclient/api.py#115)(self):**
|
||||
|
||||
— **def [sync](/recipes/recipe_modules/gclient/api.py#152)(self, cfg, with_branch_heads=False, \*\*kwargs):**
|
||||
|
||||
  **@use_mirror.setter**<br>— **def [use\_mirror](/recipes/recipe_modules/gclient/api.py#102)(self, val):**
|
||||
### *recipe_modules* / [gerrit](/recipes/recipe_modules/gerrit)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gerrit/__init__.py#1): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [json](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--json), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step)
|
||||
|
||||
#### **class [GerritApi](/recipes/recipe_modules/gerrit/api.py#7)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
Module for interact with gerrit endpoints
|
||||
|
||||
— **def [\_\_call\_\_](/recipes/recipe_modules/gerrit/api.py#10)(self, name, cmd, infra_step=True, \*\*kwargs):**
|
||||
|
||||
Wrapper for easy calling of gerrit_utils steps.
|
||||
|
||||
— **def [create\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#27)(self, host, project, branch, commit, \*\*kwargs):**
|
||||
|
||||
Create a new branch from given project and commit
|
||||
|
||||
Returns:
|
||||
the ref of the branch created
|
||||
|
||||
— **def [get\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#47)(self, host, project, branch, \*\*kwargs):**
|
||||
|
||||
Get a branch from given project and commit
|
||||
|
||||
Returns:
|
||||
the revision of the branch
|
||||
### *recipe_modules* / [git](/recipes/recipe_modules/git)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/git/__init__.py#1): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [infra_paths](#recipe_modules-infra_paths)
|
||||
|
||||
#### **class [GitApi](/recipes/recipe_modules/git/api.py#10)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [\_\_call\_\_](/recipes/recipe_modules/git/api.py#17)(self, \*args, \*\*kwargs):**
|
||||
|
||||
Return a git command step.
|
||||
|
||||
— **def [\_\_init\_\_](/recipes/recipe_modules/git/api.py#13)(self, \*args, \*\*kwargs):**
|
||||
|
||||
— **def [bundle\_create](/recipes/recipe_modules/git/api.py#391)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
|
||||
|
||||
Run 'git bundle create' on a Git repository.
|
||||
|
||||
Args:
|
||||
bundle_path (Path): The path of the output bundle.
|
||||
refs (list): The list of refs to include in the bundle. If None, all
|
||||
refs in the Git checkout will be bundled.
|
||||
kwargs: Forwarded to '__call__'.
|
||||
|
||||
— **def [cat\_file\_at\_commit](/recipes/recipe_modules/git/api.py#58)(self, file_path, commit_hash, remote_name=None, \*\*kwargs):**
|
||||
|
||||
Outputs the contents of a file at a given revision.
|
||||
|
||||
— **def [checkout](/recipes/recipe_modules/git/api.py#130)(self, url, ref=None, dir_path=None, recursive=False, submodules=True, submodule_update_force=False, keep_paths=None, step_suffix=None, curl_trace_file=None, can_fail_build=True, set_got_revision=False, remote_name=None, display_fetch_size=None, file_name=None, submodule_update_recursive=True, use_git_cache=False):**
|
||||
|
||||
Performs a full git checkout and returns sha1 of checked out revision.
|
||||
|
||||
Args:
|
||||
url (str): url of remote repo to use as upstream
|
||||
ref (str): ref to fetch and check out
|
||||
dir_path (Path): optional directory to clone into
|
||||
recursive (bool): whether to recursively fetch submodules or not
|
||||
submodules (bool): whether to sync and update submodules or not
|
||||
submodule_update_force (bool): whether to update submodules with --force
|
||||
keep_paths (iterable of strings): paths to ignore during git-clean;
|
||||
paths are gitignore-style patterns relative to checkout_path.
|
||||
step_suffix (str): suffix to add to a each step name
|
||||
curl_trace_file (Path): if not None, dump GIT_CURL_VERBOSE=1 trace to that
|
||||
file. Useful for debugging git issue reproducible only on bots. It has
|
||||
a side effect of all stderr output of 'git fetch' going to that file.
|
||||
can_fail_build (bool): if False, ignore errors during fetch or checkout.
|
||||
set_got_revision (bool): if True, resolves HEAD and sets got_revision
|
||||
property.
|
||||
remote_name (str): name of the git remote to use
|
||||
display_fetch_size (bool): if True, run `git count-objects` before and
|
||||
after fetch and display delta. Adds two more steps. Defaults to False.
|
||||
file_name (str): optional path to a single file to checkout.
|
||||
submodule_update_recursive (bool): if True, updates submodules
|
||||
recursively.
|
||||
use_git_cache (bool): if True, git cache will be used for this checkout.
|
||||
WARNING, this is EXPERIMENTAL!!! This wasn't tested with:
|
||||
* submodules
|
||||
* since origin url is modified
|
||||
to a local path, may cause problem with scripts that do
|
||||
"git fetch origin" or "git push origin".
|
||||
* arbitrary refs such refs/whatever/not-fetched-by-default-to-cache
|
||||
|
||||
Returns: If the checkout was successful, this returns the commit hash of
|
||||
the checked-out-repo. Otherwise this returns None.
|
||||
|
||||
— **def [config\_get](/recipes/recipe_modules/git/api.py#364)(self, prop_name, \*\*kwargs):**
|
||||
|
||||
Returns: (str) The Git config output, or None if no output was generated.
|
||||
|
||||
Args:
|
||||
prop_name: (str) The name of the config property to query.
|
||||
kwargs: Forwarded to '__call__'.
|
||||
|
||||
— **def [count\_objects](/recipes/recipe_modules/git/api.py#66)(self, previous_result=None, can_fail_build=False, \*\*kwargs):**
|
||||
|
||||
Returns `git count-objects` result as a dict.
|
||||
|
||||
Args:
|
||||
previous_result (dict): the result of previous count_objects call.
|
||||
If passed, delta is reported in the log and step text.
|
||||
can_fail_build (bool): if True, may fail the build and/or raise an
|
||||
exception. Defaults to False.
|
||||
|
||||
Returns:
|
||||
A dict of count-object values, or None if count-object run failed.
|
||||
|
||||
— **def [ensure\_win\_git\_tooling](/recipes/recipe_modules/git/api.py#39)(self):**
|
||||
|
||||
Ensures that depot_tools/git.bat actually exists.
|
||||
|
||||
— **def [fetch\_tags](/recipes/recipe_modules/git/api.py#52)(self, remote_name=None, \*\*kwargs):**
|
||||
|
||||
Fetches all tags from the remote.
|
||||
|
||||
— **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#381)(self, remote_name=None, \*\*kwargs):**
|
||||
|
||||
Returns: (str) The URL of the remote Git repository, or None.
|
||||
|
||||
Args:
|
||||
remote_name: (str) The name of the remote to query, defaults to 'origin'.
|
||||
kwargs: Forwarded to '__call__'.
|
||||
|
||||
— **def [get\_timestamp](/recipes/recipe_modules/git/api.py#336)(self, commit='HEAD', test_data=None, \*\*kwargs):**
|
||||
|
||||
Find and return the timestamp of the given commit.
|
||||
|
||||
— **def [new\_branch](/recipes/recipe_modules/git/api.py#404)(self, branch, name=None, upstream=None, \*\*kwargs):**
|
||||
|
||||
Runs git new-branch on a Git repository, to be used before git cl upload.
|
||||
|
||||
Args:
|
||||
branch (str): new branch name, which must not yet exist.
|
||||
name (str): step name.
|
||||
upstream (str): to origin/master.
|
||||
kwargs: Forwarded to '__call__'.
|
||||
|
||||
— **def [rebase](/recipes/recipe_modules/git/api.py#345)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
|
||||
|
||||
Run rebase HEAD onto branch
|
||||
Args:
|
||||
name_prefix (str): a prefix used for the step names
|
||||
branch (str): a branch name or a hash to rebase onto
|
||||
dir_path (Path): directory to clone into
|
||||
remote_name (str): the remote name to rebase from if not origin
|
||||
### *recipe_modules* / [git\_cl](/recipes/recipe_modules/git_cl)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/git_cl/__init__.py#1): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step)
|
||||
|
||||
#### **class [GitClApi](/recipes/recipe_modules/git_cl/api.py#9)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [\_\_call\_\_](/recipes/recipe_modules/git_cl/api.py#10)(self, subcmd, args, name=None, \*\*kwargs):**
|
||||
|
||||
— **def [get\_description](/recipes/recipe_modules/git_cl/api.py#23)(self, patch=None, codereview=None, \*\*kwargs):**
|
||||
|
||||
— **def [issue](/recipes/recipe_modules/git_cl/api.py#51)(self, \*\*kwargs):**
|
||||
|
||||
— **def [set\_description](/recipes/recipe_modules/git_cl/api.py#32)(self, description, patch=None, codereview=None, \*\*kwargs):**
|
||||
|
||||
— **def [upload](/recipes/recipe_modules/git_cl/api.py#44)(self, message, upload_args=None, \*\*kwargs):**
|
||||
### *recipe_modules* / [gitiles](/recipes/recipe_modules/gitiles)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gitiles/__init__.py#1): [json](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--json), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [url](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--url)
|
||||
|
||||
#### **class [Gitiles](/recipes/recipe_modules/gitiles/api.py#10)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
Module for polling a git repository using the Gitiles web interface.
|
||||
|
||||
— **def [commit\_log](/recipes/recipe_modules/gitiles/api.py#97)(self, url, commit, step_name=None, attempts=None):**
|
||||
|
||||
Returns: (dict) the Gitiles commit log structure for a given commit.
|
||||
|
||||
Args:
|
||||
url (str): The base repository URL.
|
||||
commit (str): The commit hash.
|
||||
step_name (str): If not None, override the step name.
|
||||
attempts (int): Number of times to try the request before failing.
|
||||
|
||||
— **def [download\_file](/recipes/recipe_modules/gitiles/api.py#113)(self, repository_url, file_path, branch='master', step_name=None, attempts=None, \*\*kwargs):**
|
||||
|
||||
Downloads raw file content from a Gitiles repository.
|
||||
|
||||
Args:
|
||||
repository_url (str): Full URL to the repository.
|
||||
branch (str): Branch of the repository.
|
||||
file_path (str): Relative path to the file from the repository root.
|
||||
step_name (str): Custom name for this step (optional).
|
||||
attempts (int): Number of times to try the request before failing.
|
||||
|
||||
Returns:
|
||||
Raw file content.
|
||||
|
||||
— **def [log](/recipes/recipe_modules/gitiles/api.py#51)(self, url, ref, limit=0, cursor=None, step_name=None, attempts=None, \*\*kwargs):**
|
||||
|
||||
Returns the most recent commits under the given ref with properties.
|
||||
|
||||
Args:
|
||||
url (str): URL of the remote repository.
|
||||
ref (str): Name of the desired ref (see Gitiles.refs).
|
||||
limit (int): Number of commits to limit the fetching to.
|
||||
Gitiles does not return all commits in one call; instead paging is
|
||||
used. 0 implies to return whatever first gerrit responds with.
|
||||
Otherwise, paging will be used to fetch at least this many
|
||||
commits, but all fetched commits will be returned.
|
||||
cursor (str or None): The paging cursor used to fetch the next page.
|
||||
step_name (str): Custom name for this step (optional).
|
||||
|
||||
Returns:
|
||||
A tuple of (commits, cursor).
|
||||
Commits are a list of commits (as Gitiles dict structure) in reverse
|
||||
chronological order. The number of commits may be higher than limit
|
||||
argument.
|
||||
Cursor can be used for subsequent calls to log for paging. If None,
|
||||
signals that there are no more commits to fetch.
|
||||
|
||||
— **def [refs](/recipes/recipe_modules/gitiles/api.py#39)(self, url, step_name='refs', attempts=None):**
|
||||
|
||||
Returns a list of refs in the remote repository.
|
||||
### *recipe_modules* / [gsutil](/recipes/recipe_modules/gsutil)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gsutil/__init__.py#1): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python)
|
||||
|
||||
#### **class [GSUtilApi](/recipes/recipe_modules/gsutil/api.py#9)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [\_\_call\_\_](/recipes/recipe_modules/gsutil/api.py#14)(self, cmd, name=None, use_retry_wrapper=True, version=None, parallel_upload=False, multithreaded=False, \*\*kwargs):**
|
||||
|
||||
A step to run arbitrary gsutil commands.
|
||||
|
||||
Note that this assumes that gsutil authentication environment variables
|
||||
(AWS_CREDENTIAL_FILE and BOTO_CONFIG) are already set, though if you want to
|
||||
set them to something else you can always do so using the env={} kwarg.
|
||||
|
||||
Note also that gsutil does its own wildcard processing, so wildcards are
|
||||
valid in file-like portions of the cmd. See 'gsutil help wildcards'.
|
||||
|
||||
Arguments:
|
||||
cmd: list of (string) arguments to pass to gsutil.
|
||||
Include gsutil-level options first (see 'gsutil help options').
|
||||
name: the (string) name of the step to use.
|
||||
Defaults to the first non-flag token in the cmd.
|
||||
|
||||
— **def [cat](/recipes/recipe_modules/gsutil/api.py#98)(self, url, args=None, \*\*kwargs):**
|
||||
|
||||
— **def [copy](/recipes/recipe_modules/gsutil/api.py#105)(self, source_bucket, source, dest_bucket, dest, args=None, link_name='gsutil.copy', metadata=None, unauthenticated_url=False, \*\*kwargs):**
|
||||
|
||||
— **def [download](/recipes/recipe_modules/gsutil/api.py#84)(self, bucket, source, dest, args=None, \*\*kwargs):**
|
||||
|
||||
— **def [download\_url](/recipes/recipe_modules/gsutil/api.py#91)(self, url, dest, args=None, \*\*kwargs):**
|
||||
|
||||
  **@property**<br>— **def [gsutil\_py\_path](/recipes/recipe_modules/gsutil/api.py#10)(self):**
|
||||
|
||||
— **def [list](/recipes/recipe_modules/gsutil/api.py#121)(self, url, args=None, \*\*kwargs):**
|
||||
|
||||
— **def [remove\_url](/recipes/recipe_modules/gsutil/api.py#135)(self, url, args=None, \*\*kwargs):**
|
||||
|
||||
— **def [signurl](/recipes/recipe_modules/gsutil/api.py#128)(self, private_key_file, bucket, dest, args=None, \*\*kwargs):**
|
||||
|
||||
— **def [upload](/recipes/recipe_modules/gsutil/api.py#68)(self, source, bucket, dest, args=None, link_name='gsutil.upload', metadata=None, unauthenticated_url=False, \*\*kwargs):**
|
||||
### *recipe_modules* / [infra\_paths](/recipes/recipe_modules/infra_paths)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/infra_paths/__init__.py#1): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties)
|
||||
|
||||
#### **class [InfraPathsApi](/recipes/recipe_modules/infra_paths/api.py#8)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
infra_paths module is glue for design mistakes. It will be removed.
|
||||
|
||||
  **@property**<br>— **def [default\_git\_cache\_dir](/recipes/recipe_modules/infra_paths/api.py#17)(self):**
|
||||
|
||||
Returns the location of the default git cache directory.
|
||||
|
||||
This property should be used instead of using path['git_cache'] directly.
|
||||
|
||||
It returns git_cache path if it is defined (Buildbot world), otherwise
|
||||
uses the more generic [CACHE]/git path (LUCI world).
|
||||
|
||||
— **def [initialize](/recipes/recipe_modules/infra_paths/api.py#11)(self):**
|
||||
### *recipe_modules* / [presubmit](/recipes/recipe_modules/presubmit)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/presubmit/__init__.py#1): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step)
|
||||
|
||||
#### **class [PresubmitApi](/recipes/recipe_modules/presubmit/api.py#7)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [\_\_call\_\_](/recipes/recipe_modules/presubmit/api.py#12)(self, \*args, \*\*kwargs):**
|
||||
|
||||
Return a presubmit step.
|
||||
|
||||
  **@property**<br>— **def [presubmit\_support\_path](/recipes/recipe_modules/presubmit/api.py#8)(self):**
|
||||
### *recipe_modules* / [rietveld](/recipes/recipe_modules/rietveld)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/rietveld/__init__.py#1): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step)
|
||||
|
||||
#### **class [RietveldApi](/recipes/recipe_modules/rietveld/api.py#10)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [apply\_issue](/recipes/recipe_modules/rietveld/api.py#53)(self, \*root_pieces, \*\*kwargs):**
|
||||
|
||||
Call apply_issue from depot_tools.
|
||||
|
||||
Args:
|
||||
root_pieces (strings): location where to run apply_issue, relative to the
|
||||
checkout root.
|
||||
authentication (string or None): authentication scheme to use. Can be None
|
||||
or 'oauth2'. See also apply_issue.py --help (-E and --no-auth options.)
|
||||
|
||||
— **def [calculate\_issue\_root](/recipes/recipe_modules/rietveld/api.py#11)(self, extra_patch_project_roots=None):**
|
||||
|
||||
Returns path where a patch should be applied to based on "patch_project".
|
||||
|
||||
YOU SHOULD NOT USE THIS METHOD. Put this into gclient's config as
|
||||
patch_projects instead, and with luck you won't need to use
|
||||
calculate_patch_root from gclient api.
|
||||
TODO(tandrii): remove this method completely. See http://crbug.com/605563.
|
||||
|
||||
Maps Rietveld's "patch_project" to a path of directories relative to
|
||||
api.gclient.c.solutions[0].name which describe where to place the patch.
|
||||
|
||||
Args:
|
||||
extra_patch_project_roots: Dict mapping project names to relative roots.
|
||||
|
||||
Returns:
|
||||
Relative path or empty string if patch_project is not set or path for a
|
||||
given is unknown.
|
||||
### *recipe_modules* / [tryserver](/recipes/recipe_modules/tryserver)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/tryserver/__init__.py#5): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [json](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--json), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [git](#recipe_modules-git), [git_cl](#recipe_modules-git_cl), [rietveld](#recipe_modules-rietveld)
|
||||
|
||||
#### **class [TryserverApi](/recipes/recipe_modules/tryserver/api.py#16)([RecipeApi](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/recipe_engine/recipe_api.py#L884)):**
|
||||
|
||||
— **def [\_\_init\_\_](/recipes/recipe_modules/tryserver/api.py#17)(self, \*args, \*\*kwargs):**
|
||||
|
||||
— **def [add\_failure\_reason](/recipes/recipe_modules/tryserver/api.py#224)(self, reason):**
|
||||
|
||||
Records a more detailed reason why build is failing.
|
||||
|
||||
The reason can be any JSON-serializable object.
|
||||
|
||||
— **def [apply\_from\_git](/recipes/recipe_modules/tryserver/api.py#67)(self, cwd):**
|
||||
|
||||
Downloads patch from given git repo and ref and applies it
|
||||
|
||||
  **@property**<br>— **def [can\_apply\_issue](/recipes/recipe_modules/tryserver/api.py#27)(self):**
|
||||
|
||||
Returns true iff the properties exist to apply_issue from rietveld.
|
||||
|
||||
— **def [determine\_patch\_storage](/recipes/recipe_modules/tryserver/api.py#94)(self):**
|
||||
|
||||
Determines patch_storage automatically based on properties.
|
||||
|
||||
— **def [get\_files\_affected\_by\_patch](/recipes/recipe_modules/tryserver/api.py#124)(self, patch_root=None, \*\*kwargs):**
|
||||
|
||||
Returns list of paths to files affected by the patch.
|
||||
|
||||
Argument:
|
||||
patch_root: path relative to api.path['root'], usually obtained from
|
||||
api.gclient.calculate_patch_root(patch_project)
|
||||
|
||||
Returned paths will be relative to to patch_root.
|
||||
|
||||
TODO(tandrii): remove this doc.
|
||||
Unless you use patch_root=None, in which case old behavior is used
|
||||
which returns paths relative to checkout aka solution[0].name.
|
||||
|
||||
— **def [get\_footer](/recipes/recipe_modules/tryserver/api.py#285)(self, tag, patch_text=None):**
|
||||
|
||||
Gets a specific tag from a CL description
|
||||
|
||||
— **def [get\_footers](/recipes/recipe_modules/tryserver/api.py#260)(self, patch_text=None):**
|
||||
|
||||
Retrieves footers from the patch description.
|
||||
|
||||
footers are machine readable tags embedded in commit messages. See
|
||||
git-footers documentation for more information.
|
||||
|
||||
  **@property**<br>— **def [is\_gerrit\_issue](/recipes/recipe_modules/tryserver/api.py#34)(self):**
|
||||
|
||||
Returns true iff the properties exist to match a Gerrit issue.
|
||||
|
||||
  **@property**<br>— **def [is\_patch\_in\_git](/recipes/recipe_modules/tryserver/api.py#44)(self):**
|
||||
|
||||
  **@property**<br>— **def [is\_tryserver](/recipes/recipe_modules/tryserver/api.py#21)(self):**
|
||||
|
||||
Returns true iff we can apply_issue or patch.
|
||||
|
||||
— **def [maybe\_apply\_issue](/recipes/recipe_modules/tryserver/api.py#103)(self, cwd=None, authentication=None):**
|
||||
|
||||
If we're a trybot, apply a codereview issue.
|
||||
|
||||
Args:
|
||||
cwd: If specified, apply the patch from the specified directory.
|
||||
authentication: authentication scheme whenever apply_issue.py is called.
|
||||
This is only used if the patch comes from Rietveld. Possible values:
|
||||
None, 'oauth2' (see also api.rietveld.apply_issue.)
|
||||
|
||||
— **def [set\_compile\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#203)(self):**
|
||||
|
||||
Mark the tryjob result as a compile failure.
|
||||
|
||||
  **@contextlib.contextmanager**<br>— **def [set\_failure\_hash](/recipes/recipe_modules/tryserver/api.py#233)(self):**
|
||||
|
||||
Context manager that sets a failure_hash build property on StepFailure.
|
||||
|
||||
This can be used to easily compare whether two builds have failed
|
||||
for the same reason. For example, if a patch is bad (breaks something),
|
||||
we'd expect it to always break in the same way. Different failures
|
||||
for the same patch are usually a sign of flakiness.
|
||||
|
||||
— **def [set\_invalid\_test\_results\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#215)(self):**
|
||||
|
||||
Mark the tryjob result as having invalid test results.
|
||||
|
||||
This means we run some tests, but the results were not valid
|
||||
(e.g. no list of specific test cases that failed, or too many
|
||||
tests failing, etc).
|
||||
|
||||
— **def [set\_patch\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#199)(self):**
|
||||
|
||||
Mark the tryjob result as failure to apply the patch.
|
||||
|
||||
— **def [set\_subproject\_tag](/recipes/recipe_modules/tryserver/api.py#181)(self, subproject_tag):**
|
||||
|
||||
Adds a subproject tag to the build.
|
||||
|
||||
This can be used to distinguish between builds that execute different steps
|
||||
depending on what was patched, e.g. blink vs. pure chromium patches.
|
||||
|
||||
— **def [set\_test\_failure\_tryjob\_result](/recipes/recipe_modules/tryserver/api.py#207)(self):**
|
||||
|
||||
Mark the tryjob result as a test failure.
|
||||
|
||||
This means we started running actual tests (not prerequisite steps
|
||||
like checkout or compile), and some of these tests have failed.
|
||||
## Recipes
|
||||
|
||||
### *recipes* / [bot\_update:examples/full](/recipes/recipe_modules/bot_update/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/bot_update/examples/full.py#5): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [bot_update](#recipe_modules-bot_update), [gclient](#recipe_modules-gclient)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/bot_update/examples/full.py#13)(api):**
|
||||
### *recipes* / [cipd:examples/full](/recipes/recipe_modules/cipd/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/cipd/examples/full.py#8): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [cipd](#recipe_modules-cipd)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/cipd/examples/full.py#27)(api, use_pkg, pkg_files, pkg_dirs, ver_files, install_mode):**
|
||||
### *recipes* / [depot\_tools:examples/full](/recipes/recipe_modules/depot_tools/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/depot_tools/examples/full.py#5): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [depot_tools](#recipe_modules-depot_tools)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/depot_tools/examples/full.py#13)(api):**
|
||||
### *recipes* / [gclient:examples/full](/recipes/recipe_modules/gclient/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gclient/examples/full.py#5): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [gclient](#recipe_modules-gclient)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/gclient/examples/full.py#45)(api):**
|
||||
### *recipes* / [gclient:tests/patch\_project](/recipes/recipe_modules/gclient/tests/patch_project.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gclient/tests/patch_project.py#9): [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [gclient](#recipe_modules-gclient)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/gclient/tests/patch_project.py#20)(api, patch_project):**
|
||||
### *recipes* / [gerrit:examples/full](/recipes/recipe_modules/gerrit/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gerrit/examples/full.py#5): [gerrit](#recipe_modules-gerrit)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/gerrit/examples/full.py#10)(api):**
|
||||
### *recipes* / [git:examples/full](/recipes/recipe_modules/git/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/git/examples/full.py#5): [context](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--context), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [git](#recipe_modules-git)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/git/examples/full.py#16)(api):**
|
||||
### *recipes* / [git\_cl:examples/full](/recipes/recipe_modules/git_cl/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/git_cl/examples/full.py#9): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [git_cl](#recipe_modules-git_cl)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/git_cl/examples/full.py#17)(api):**
|
||||
### *recipes* / [gitiles:examples/full](/recipes/recipe_modules/gitiles/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gitiles/examples/full.py#5): [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [gitiles](#recipe_modules-gitiles)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/gitiles/examples/full.py#11)(api):**
|
||||
### *recipes* / [gsutil:examples/full](/recipes/recipe_modules/gsutil/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gsutil/examples/full.py#5): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [gsutil](#recipe_modules-gsutil)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/gsutil/examples/full.py#11)(api):**
|
||||
|
||||
Move things around in a loop!
|
||||
### *recipes* / [infra\_paths:examples/full](/recipes/recipe_modules/infra_paths/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/infra_paths/examples/full.py#7): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [infra_paths](#recipe_modules-infra_paths)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/infra_paths/examples/full.py#16)(api):**
|
||||
### *recipes* / [presubmit:examples/full](/recipes/recipe_modules/presubmit/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/presubmit/examples/full.py#5): [presubmit](#recipe_modules-presubmit)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/presubmit/examples/full.py#10)(api):**
|
||||
### *recipes* / [rietveld:examples/full](/recipes/recipe_modules/rietveld/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/rietveld/examples/full.py#5): [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [infra_paths](#recipe_modules-infra_paths), [rietveld](#recipe_modules-rietveld)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/rietveld/examples/full.py#13)(api):**
|
||||
### *recipes* / [tryserver:examples/full](/recipes/recipe_modules/tryserver/examples/full.py)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/tryserver/examples/full.py#5): [json](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--json), [path](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--path), [platform](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--platform), [properties](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--properties), [python](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--python), [raw_io](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--raw_io), [step](https://github.com/luci/recipes-py/blob/c8d78bf15c065b5a35ccfc5798d1498d0899bb68/README.recipes.md#recipe_modules--step), [tryserver](#recipe_modules-tryserver)
|
||||
|
||||
— **def [RunSteps](/recipes/recipe_modules/tryserver/examples/full.py#17)(api):**
|
Loading…
Reference in New Issue