Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: recipe_modules/bot_update/api.py

Issue 2108073002: bot_update: Allow patch_oauth2 to work in kitchen (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/bot_update/api.py
diff --git a/recipe_modules/bot_update/api.py b/recipe_modules/bot_update/api.py
index 8b3a35b0b8486556235c5a0834b87291d5329a39..15651de456ef7a8a7566776ef71c64205f494c60 100644
--- a/recipe_modules/bot_update/api.py
+++ b/recipe_modules/bot_update/api.py
@@ -57,12 +57,14 @@ class BotUpdateApi(recipe_api.RecipeApi):
patch=True, update_presentation=True,
force=False, patch_root=None, no_shallow=False,
with_branch_heads=False, refs=None,
- patch_oauth2=False,
+ patch_oauth2=False, patch_oauth2_in_puppet=False,
output_manifest=True, clobber=False,
root_solution_revision=None, rietveld=None, issue=None,
patchset=None, gerrit_no_reset=False, **kwargs):
"""
Args:
+ patch_oauth2_in_puppet: If the oauth2 credentials live in puppet, or in
Vadim Sh. 2016/06/29 03:58:08 this is misleading, in both cases they are managed
martiniss 2016/06/29 04:32:08 went with 'use_site_config_creds'
+ 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
@@ -119,10 +121,15 @@ class BotUpdateApi(recipe_api.RecipeApi):
# Point to the oauth2 auth files if specified.
# These paths are where the bots put their credential files.
if patch_oauth2:
- email_file = self.m.path['build'].join(
- 'site_config', '.rietveld_client_email')
- key_file = self.m.path['build'].join(
- 'site_config', '.rietveld_secret_key')
+ # TODO(martiniss): remove this hack :(. crbug.com/624212
+ if patch_oauth2_in_puppet: #pragma: no cover
+ email_file = '/creds/refresh_tokens/rietveld_client_email'
Vadim Sh. 2016/06/29 03:58:08 this is going to be /creds/rietveld/client_email
martiniss 2016/06/29 04:32:08 Done.
+ key_file = '/creds/refresh_tokens/rietveld_secret_key'
+ else:
+ email_file = self.m.path['build'].join(
+ 'site_config', '.rietveld_client_email')
+ key_file = self.m.path['build'].join(
+ 'site_config', '.rietveld_secret_key')
else:
email_file = key_file = None
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698