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

Side by Side Diff: master/skia_master_scripts/housekeeping_periodic_factory.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Address comment Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 """Utility class to build the Skia master BuildFactory's for HouseKeeping bots.
6
7 Overrides SkiaFactory with Periodic HouseKeeping steps."""
8
9 import builder_name_schema
10
11 from config_private import SKIA_PUBLIC_MASTER_INTERNAL_FQDN
12 from skia_master_scripts import factory as skia_factory
13
14
15 # TODO: The HouseKeepingPeriodicFactory uses shell scripts, so it would break on
16 # Windows. For now, we reply on the fact that the housekeeping bot always runs
17 # on a Linux machine.
18 class HouseKeepingPeriodicFactory(skia_factory.SkiaFactory):
19 """Overrides for HouseKeeping periodic builds."""
20
21 def Build(self, role=builder_name_schema.BUILDER_ROLE_HOUSEKEEPER,
22 clobber=None):
23 """Build and return the complete BuildFactory.
24
25 role: string; type of builder.
26 clobber: boolean indicating whether we should clean before building
27 """
28 if role != builder_name_schema.BUILDER_ROLE_HOUSEKEEPER:
29 raise Exception('Housekeeping builders must have role "%s"' %
30 builder_name_schema.BUILDER_ROLE_HOUSEKEEPER)
31
32 self.UpdateSteps()
33 if clobber is None:
34 clobber = self._default_clobber
35 if clobber:
36 self.AddSlaveScript(script='clean.py', description='Clean')
37
38 # pylint: disable=W0212
39 clang_static_analyzer_script_path = self.TargetPath.join(
40 self._skia_cmd_obj._local_slave_script_dir,
41 'run-clang-static-analyzer.sh')
42 self._skia_cmd_obj.AddRunCommand(
43 command=clang_static_analyzer_script_path,
44 description='RunClangStaticAnalyzer')
45
46 self.AddSlaveScript(script='check_gs_timestamps.py',
47 description='CheckGoogleStorageTimestamps')
48
49 if not self._do_patch_step: # Do not run the checkers if it is a try job.
50 # pylint: disable=W0212
51 disk_usage_script_path = self.TargetPath.join(
52 self._skia_cmd_obj._local_slave_script_dir,
53 'check_compute_engine_disk_usage.sh')
54 self._skia_cmd_obj.AddRunCommand(
55 command=('SKIA_COMPUTE_ENGINE_HOSTNAME=%s PERSISTENT_DISK_NAME='
56 '/home/default/skia-repo %s'
57 % (SKIA_PUBLIC_MASTER_INTERNAL_FQDN,
58 disk_usage_script_path)),
59 description='CheckMasterDiskUsage')
60
61 self.Validate()
62 return self
OLDNEW
« no previous file with comments | « master/skia_master_scripts/housekeeping_percommit_factory.py ('k') | master/skia_master_scripts/ios_factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698