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

Side by Side Diff: infra/tools/bot_setup/version/version.py

Issue 998953003: Make windows bot infra bot_setup canaries (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: fix Created 5 years, 9 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 | « infra/tools/bot_setup/version/test/version_test.expected/TestVersions.test_expected_active_versions.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Returns the canonical version of bot setup scripts for hostname and image.""" 6 """Returns the canonical version of bot setup scripts for hostname and image."""
7 7
8 8
9 LKGR = '87378f3474795c1426746bc5144e7459c2174b01' 9 LKGR = '87378f3474795c1426746bc5144e7459c2174b01'
10 DISABLED_BUILDERS = [ 10 DISABLED_BUILDERS = [
11 'test_disabled_slave' 11 'test_disabled_slave'
12 ] 12 ]
13 13
14 CANARY_SLAVES = ( 14 CANARY_SLAVES = (
15 ['swarm%d-c4' % i for i in xrange(1, 10)] + 15 ['swarm%d-c4' % i for i in xrange(1, 10)] +
16 ['slave%d-c4' % i for i in xrange(250, 260)]) 16 ['slave%d-c4' % i for i in xrange(250, 260)] +
17 ['winslave1-c4', 'swarm-win1-c4'])
17 18
18 19
19 class BuilderDisabled(Exception): 20 class BuilderDisabled(Exception):
20 """This is raised when a builder should be disabled. 21 """This is raised when a builder should be disabled.
21 22
22 By raising an exception, the startup sequence becomes interrupted. 23 By raising an exception, the startup sequence becomes interrupted.
23 """ 24 """
24 pass 25 pass
25 26
26 27
27 def get_version(slave_name=None, _image_name=None): 28 def get_version(slave_name=None, _image_name=None):
28 if slave_name and slave_name in DISABLED_BUILDERS: 29 if slave_name and slave_name in DISABLED_BUILDERS:
29 raise BuilderDisabled() 30 raise BuilderDisabled()
30 if not slave_name or slave_name in CANARY_SLAVES: 31 if not slave_name or slave_name in CANARY_SLAVES:
31 return 'origin/master' 32 return 'origin/master'
32 return LKGR 33 return LKGR
OLDNEW
« no previous file with comments | « infra/tools/bot_setup/version/test/version_test.expected/TestVersions.test_expected_active_versions.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698