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

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

Issue 2209343002: [recipes] Stop pretending that buildbot_spec is a step, simplify (Closed) Base URL: https://skia.googlesource.com/skia.git@merge_buildbot_spec_sub1
Patch Set: rebase Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | infra/bots/recipe_modules/vars/api.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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import json 9 import json
10 import os 10 import os
11 import re 11 import re
12 import sys 12 import sys
13 13
14 from recipe_engine import recipe_api 14 from recipe_engine import recipe_api
15 from recipe_engine import config_types 15 from recipe_engine import config_types
16 16
17 17
18 class SkiaApi(recipe_api.RecipeApi): 18 class SkiaApi(recipe_api.RecipeApi):
19 19
20 def setup(self): 20 def setup(self):
21 """Prepare the bot to run.""" 21 """Prepare the bot to run."""
22 # Setup dependencies. 22 # Setup dependencies.
23 self.m.vars.setup() 23 self.m.vars.setup()
24 24
25 # Check out the Skia code. 25 # Check out the Skia code.
26 self.checkout_steps() 26 self.checkout_steps()
27 27
28 # Obtain the spec for this builder from the Skia repo. Use it to set more
29 # properties.
30 builder_spec = self.m.vars.get_builder_spec(self.m.vars.builder_name)
31
32 # Continue setting up vars with the builder_spec.
33 self.m.vars.update_with_builder_spec(builder_spec)
34
35 if not self.m.path.exists(self.m.vars.tmp_dir): 28 if not self.m.path.exists(self.m.vars.tmp_dir):
36 self.m.run.run_once(self.m.file.makedirs, 29 self.m.run.run_once(self.m.file.makedirs,
37 'tmp_dir', 30 'tmp_dir',
38 self.m.vars.tmp_dir, 31 self.m.vars.tmp_dir,
39 infra_step=True) 32 infra_step=True)
40 33
41 self.m.flavor.setup() 34 self.m.flavor.setup()
42 35
43 def update_repo(self, parent_dir, repo): 36 def update_repo(self, parent_dir, repo):
44 """Update an existing repo. This is safe to call without gen_steps.""" 37 """Update an existing repo. This is safe to call without gen_steps."""
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 revert=False, 137 revert=False,
145 **checkout_kwargs) 138 **checkout_kwargs)
146 139
147 self.m.vars.got_revision = ( 140 self.m.vars.got_revision = (
148 update_step.presentation.properties['got_revision']) 141 update_step.presentation.properties['got_revision'])
149 self.m.tryserver.maybe_apply_issue() 142 self.m.tryserver.maybe_apply_issue()
150 143
151 if self.m.vars.need_chromium_checkout: 144 if self.m.vars.need_chromium_checkout:
152 self.m.gclient.runhooks(cwd=self.m.vars.checkout_root, 145 self.m.gclient.runhooks(cwd=self.m.vars.checkout_root,
153 env=self.m.vars.gclient_env) 146 env=self.m.vars.gclient_env)
OLDNEW
« no previous file with comments | « no previous file | infra/bots/recipe_modules/vars/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698