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

Unified Diff: scripts/slave/recipe_modules/service_account/config.py

Issue 1954753003: Service account module (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 7 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
Index: scripts/slave/recipe_modules/service_account/config.py
diff --git a/scripts/slave/recipe_modules/service_account/config.py b/scripts/slave/recipe_modules/service_account/config.py
new file mode 100644
index 0000000000000000000000000000000000000000..a7d720e011450181201112f53cbb9211e9f30557
--- /dev/null
+++ b/scripts/slave/recipe_modules/service_account/config.py
@@ -0,0 +1,29 @@
+import os
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from recipe_engine.config import config_item_context, ConfigGroup
+from recipe_engine.config import Single
+
+
+def BaseConfig():
+ return ConfigGroup(
+ accounts_path = Single(str, required=True),
+ authutil_path = Single(str, required=True))
+
+
+config_ctx = config_item_context(BaseConfig)
+
+
+@config_ctx()
+def service_account_windows(c):
+ c.accounts_path = 'C:\\creds\\service_accounts'
+ c.authutil_path = 'C:\\infra-tools\\authutil.exe'
nodir 2016/05/06 20:32:09 why AUTHUTILPATH is not read on windows?
nodir 2016/05/06 20:38:01 apparently we should not use env in recipes becaus
nodir 2016/05/06 20:38:01 also please add a TODO that authutil should be ins
RobertoCN 2016/05/06 21:38:10 Done.
RobertoCN 2016/05/06 21:38:11 Done.
RobertoCN 2016/05/06 21:38:11 Removed the reading of the env variable completely
+
+
+@config_ctx()
+def service_account_default(c):
+ c.accounts_path = '/creds/service_accounts'
+ c.authutil_path = os.environ.get(
+ 'AUTHUTILPATH', '/opt/infra-tools/authutil')

Powered by Google App Engine
This is Rietveld 408576698