Home | History | Annotate | Download | only in recipes
      1 # Copyright 2017 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 
      6 # Recipe for uploading skiaserve to gs://skia-public-binaries.
      7 
      8 
      9 DEPS = [
     10   'core',
     11   'flavor',
     12   'gsutil',
     13   'recipe_engine/context',
     14   'recipe_engine/file',
     15   'recipe_engine/path',
     16   'recipe_engine/properties',
     17   'recipe_engine/step',
     18   'recipe_engine/time',
     19   'vars',
     20 ]
     21 
     22 
     23 def RunSteps(api):
     24   api.vars.setup()
     25 
     26   if api.properties.get('patch_issue') or api.properties.get('patch_set'):
     27     # Do not upload skiaserve for trybots.
     28     return
     29 
     30   src = api.path['start_dir'].join('out', api.vars.configuration, 'skiaserve')
     31   target_arch = api.vars.builder_cfg.get('target_arch')
     32   dest = 'gs://skia-public-binaries/skiaserve/%s/%s/' % (
     33       target_arch, api.properties['revision'])
     34   api.gsutil.cp('skiaserve', src, dest)
     35 
     36 
     37 def GenTests(api):
     38   builder = 'Build-Debian9-Clang-arm-Release-Android'
     39   yield (
     40     api.test('normal_bot') +
     41     api.properties(buildername=builder,
     42                    repository='https://skia.googlesource.com/skia.git',
     43                    swarm_out_dir='[SWARM_OUT_DIR]',
     44                    revision='abc123',
     45                    path_config='kitchen')
     46   )
     47 
     48   yield (
     49     api.test('trybot') +
     50     api.properties(buildername=builder,
     51                    repository='https://skia.googlesource.com/skia.git',
     52                    swarm_out_dir='[SWARM_OUT_DIR]',
     53                    revision='abc123',
     54                    path_config='kitchen',
     55                    patch_storage='gerrit') +
     56     api.properties.tryserver(
     57         buildername=builder,
     58         gerrit_project='skia',
     59         gerrit_url='https://skia-review.googlesource.com/',
     60     )
     61   )
     62