aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipes/upload_skiaserve.py
blob: 1b36a397e0993fb532ec6f7631801c4099db7874 (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
50
51
52
53
54
55
56
57
58
59
60
# Copyright 2017 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.


# Recipe for uploading skiaserve to gs://skia-public-binaries.


DEPS = [
  'flavor',
  'gsutil',
  'recipe_engine/context',
  'recipe_engine/file',
  'recipe_engine/path',
  'recipe_engine/properties',
  'recipe_engine/step',
  'recipe_engine/time',
  'vars',
]


def RunSteps(api):
  api.vars.setup()

  if api.properties.get('patch_issue') or api.properties.get('patch_set'):
    # Do not upload skiaserve for trybots.
    return

  src = api.vars.build_dir.join('skiaserve')
  target_arch = api.vars.builder_cfg.get('target_arch')
  dest = 'gs://skia-public-binaries/skiaserve/%s/%s/' % (
      target_arch, api.properties['revision'])
  api.gsutil.cp('skiaserve', src, dest)


def GenTests(api):
  builder = 'Build-Debian9-Clang-arm-Release-Android'
  yield (
    api.test('normal_bot') +
    api.properties(buildername=builder,
                   repository='https://skia.googlesource.com/skia.git',
                   swarm_out_dir='[SWARM_OUT_DIR]',
                   revision='abc123',
                   path_config='kitchen')
  )

  yield (
    api.test('trybot') +
    api.properties(buildername=builder,
                   repository='https://skia.googlesource.com/skia.git',
                   swarm_out_dir='[SWARM_OUT_DIR]',
                   revision='abc123',
                   path_config='kitchen',
                   patch_storage='gerrit') +
    api.properties.tryserver(
        buildername=builder,
        gerrit_project='skia',
        gerrit_url='https://skia-review.googlesource.com/',
    )
  )