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

Side by Side Diff: scripts/master/factory/commands.py

Issue 14440005: Rework how bots get the version of Blink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: test, switch to using blink_config parameter to GClient Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Set of utilities to add commands to a buildbot factory (BuildFactory). 5 """Set of utilities to add commands to a buildbot factory (BuildFactory).
6 6
7 All the utility functions to add steps to a build factory here are not 7 All the utility functions to add steps to a build factory here are not
8 project-specific. See the other *_commands.py for project-specific commands. 8 project-specific. See the other *_commands.py for project-specific commands.
9 """ 9 """
10 10
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 locks=[self.slave_exclusive_lock], 746 locks=[self.slave_exclusive_lock],
747 timeout=60*5, 747 timeout=60*5,
748 workdir='../../..', 748 workdir='../../..',
749 command=command) 749 command=command)
750 750
751 def AddUpdateStep(self, gclient_spec, env=None, timeout=None, 751 def AddUpdateStep(self, gclient_spec, env=None, timeout=None,
752 sudo_for_remove=False, gclient_deps=None, 752 sudo_for_remove=False, gclient_deps=None,
753 gclient_nohooks=False, no_gclient_branch=False, 753 gclient_nohooks=False, no_gclient_branch=False,
754 no_gclient_revision=False, 754 no_gclient_revision=False,
755 gclient_transitive=False, primary_repo=None, 755 gclient_transitive=False, primary_repo=None,
756 gclient_jobs=None): 756 gclient_jobs=None, blink_config=None):
757 """Adds a step to the factory to update the workspace.""" 757 """Adds a step to the factory to update the workspace."""
758 env = env or {} 758 env = env or {}
759 env['DEPOT_TOOLS_UPDATE'] = '0' 759 env['DEPOT_TOOLS_UPDATE'] = '0'
760 if timeout is None: 760 if timeout is None:
761 # svn timeout is 2 min; we allow 5 761 # svn timeout is 2 min; we allow 5
762 timeout = 60*5 762 timeout = 60*5
763 self._factory.addStep( 763 self._factory.addStep(
764 chromium_step.GClient, 764 chromium_step.GClient,
765 gclient_spec=gclient_spec, 765 gclient_spec=gclient_spec,
766 gclient_deps=gclient_deps, 766 gclient_deps=gclient_deps,
767 # TODO(maruel): Kept for compatibility but will be removed. 767 # TODO(maruel): Kept for compatibility but will be removed.
768 gclient_nohooks=gclient_nohooks, 768 gclient_nohooks=gclient_nohooks,
769 workdir=self.working_dir, 769 workdir=self.working_dir,
770 mode='update', 770 mode='update',
771 env=env, 771 env=env,
772 locks=[self.slave_exclusive_lock], 772 locks=[self.slave_exclusive_lock],
773 retry=(60*5, 4), # Try 4+1=5 more times, 5 min apart 773 retry=(60*5, 4), # Try 4+1=5 more times, 5 min apart
774 timeout=timeout, 774 timeout=timeout,
775 gclient_jobs=gclient_jobs, 775 gclient_jobs=gclient_jobs,
776 sudo_for_remove=sudo_for_remove, 776 sudo_for_remove=sudo_for_remove,
777 rm_timeout=60*15, # The step can take a long time. 777 rm_timeout=60*15, # The step can take a long time.
778 no_gclient_branch=no_gclient_branch, 778 no_gclient_branch=no_gclient_branch,
779 no_gclient_revision=no_gclient_revision, 779 no_gclient_revision=no_gclient_revision,
780 gclient_transitive=gclient_transitive, 780 gclient_transitive=gclient_transitive,
781 primary_repo=primary_repo) 781 primary_repo=primary_repo,
782 blink_config=blink_config)
782 783
783 def AddApplyIssueStep(self, timeout, server): 784 def AddApplyIssueStep(self, timeout, server):
784 """Adds a step to the factory to apply an issues from Rietveld. 785 """Adds a step to the factory to apply an issues from Rietveld.
785 786
786 It is a conditional step that is only run on the try server if the following 787 It is a conditional step that is only run on the try server if the following
787 conditions are all true: 788 conditions are all true:
788 - There are both build properties issue and patchset 789 - There are both build properties issue and patchset
789 - There is no patch attached 790 - There is no patch attached
790 791
791 Args: 792 Args:
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 1174
1174 def commandComplete(self, cmd): 1175 def commandComplete(self, cmd):
1175 out = cmd.logs['stdio'].getText() 1176 out = cmd.logs['stdio'].getText()
1176 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) 1177 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out)
1177 for propname, value in build_properties: 1178 for propname, value in build_properties:
1178 # findall can return strings containing CR characters, remove with strip. 1179 # findall can return strings containing CR characters, remove with strip.
1179 self.build.setProperty(propname, value.strip(), 'Step') 1180 self.build.setProperty(propname, value.strip(), 'Step')
1180 1181
1181 def getText(self, cmd, results): 1182 def getText(self, cmd, results):
1182 return self.describe(True) + self.messages 1183 return self.describe(True) + self.messages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698