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

Unified Diff: infra/bots/recipes/swarm_infra.py

Issue 2444883002: Add infra recipe module, use for updating Go DEPS (Closed)
Patch Set: Created 4 years, 2 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 | « infra/bots/recipes/swarm_RecreateSKPs.expected/Housekeeper-Weekly-RecreateSKPs.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipes/swarm_infra.py
diff --git a/infra/bots/recipes/swarm_infra.py b/infra/bots/recipes/swarm_infra.py
index bfc004b1385fd38b83352e8ad6dbd8223c65c41c..a790fd5f5949409d8d0a6ef5c77c193d7f84a7ad 100644
--- a/infra/bots/recipes/swarm_infra.py
+++ b/infra/bots/recipes/swarm_infra.py
@@ -8,37 +8,19 @@
DEPS = [
'core',
+ 'infra',
'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/step',
+ 'run',
'vars',
]
-UPDATE_GO_ATTEMPTS = 5
-
-
def RunSteps(api):
api.vars.setup()
api.core.checkout_steps()
-
- # Attempt to update go dependencies. This fails flakily sometimes, so perform
- # multiple attempts.
- gopath = api.vars.checkout_root.join('gopath')
- env = {'GOPATH': gopath}
- name = 'update go pkgs'
- for attempt in xrange(UPDATE_GO_ATTEMPTS):
- step_name = name
- if attempt > 0:
- step_name += ' (attempt %d)' % (attempt + 1)
- try:
- api.step(step_name,
- cmd=['go', 'get', '-u', 'go.skia.org/infra/...'],
- env=env)
- break
- except api.step.StepFailure:
- if attempt == UPDATE_GO_ATTEMPTS - 1:
- raise
+ api.infra.update_go_deps()
# Run the infra tests.
infra_tests = api.vars.skia_dir.join(
@@ -46,7 +28,7 @@ def RunSteps(api):
api.step('infra_tests',
cmd=['python', infra_tests],
cwd=api.vars.skia_dir,
- env=env)
+ env=api.infra.go_env)
def GenTests(api):
« no previous file with comments | « infra/bots/recipes/swarm_RecreateSKPs.expected/Housekeeper-Weekly-RecreateSKPs.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698