summaryrefslogtreecommitdiff
path: root/build/scripts/slave/recipes/infra/master_manager_config.py
blob: 3f5d633f5461e978f0d92694ba01b882e4e4276f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

DEPS = [
  'bot_update',
  'file',
  'gclient',
  'json',
  'path',
  'platform',
  'properties',
  'python',
  'step',
]


def RunSteps(api):
  api.gclient.set_config('infradata_master_manager')
  api.bot_update.ensure_checkout(
      force=True, patch_root='infra-data-master-manager', patch_oauth2=True)
  api.gclient.runhooks()

  api.python('master manager configuration test',
             api.path['slave_build'].join('infra', 'run.py'),
             ['infra.services.master_manager_launcher',
             '--verify',
             '--json-file',
             api.path['slave_build'].join(
                 'infra-data-master-manager',
                 'desired_master_state.json')])


def GenTests(api):
  yield (
      api.test('master_manager_config') +
      api.properties.git_scheduled(
          buildername='infradata_config',
          buildnumber=123,
          mastername='internal.infra',
          repository='https://chrome-internal.googlesource.com/infradata'))
  yield (
      api.test('master_manager_config_patch') +
      api.properties.git_scheduled(
          buildername='infradata_config',
          buildnumber=123,
          mastername='internal.infra.try',
          patch_project='infra-data-configs',
          repository='https://chrome-internal.googlesource.com/infradata'))