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

Side by Side Diff: infra/bots/recipe_modules/run/api.py

Issue 2444883002: Add infra recipe module, use for updating Go DEPS (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « infra/bots/recipe_modules/infra/api.py ('k') | infra/bots/recipes/swarm_RecreateSKPs.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 # pylint: disable=W0201 6 # pylint: disable=W0201
7 7
8 8
9 from recipe_engine import recipe_api 9 from recipe_engine import recipe_api
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 path = os.path.join(src, pattern) 108 path = os.path.join(src, pattern)
109 for f in glob.glob(path): 109 for f in glob.glob(path):
110 dst_path = os.path.join(dst, os.path.relpath(f, src)) 110 dst_path = os.path.join(dst, os.path.relpath(f, src))
111 if not os.path.isdir(os.path.dirname(dst_path)): 111 if not os.path.isdir(os.path.dirname(dst_path)):
112 os.makedirs(os.path.dirname(dst_path)) 112 os.makedirs(os.path.dirname(dst_path))
113 print 'Copying build product %%s to %%s' %% (f, dst_path) 113 print 'Copying build product %%s to %%s' %% (f, dst_path)
114 shutil.move(f, dst_path) 114 shutil.move(f, dst_path)
115 ''' % str(BUILD_PRODUCTS_ISOLATE_WHITELIST), 115 ''' % str(BUILD_PRODUCTS_ISOLATE_WHITELIST),
116 args=[src, dst], 116 args=[src, dst],
117 infra_step=True) 117 infra_step=True)
118
119 def with_retry(self, steptype, name, attempts, *args, **kwargs):
120 for attempt in xrange(attempts):
121 step_name = name
122 if attempt > 0:
123 step_name += ' (attempt %d)' % (attempt + 1)
124 try:
125 steptype(step_name, *args, **kwargs)
126 return
127 except self.m.step.StepFailure:
128 if attempt == attempts - 1:
129 raise
OLDNEW
« no previous file with comments | « infra/bots/recipe_modules/infra/api.py ('k') | infra/bots/recipes/swarm_RecreateSKPs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698