| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 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 from recipe_engine.recipe_api import Property |
| 6 |
| 7 DEPS = [ |
| 8 'recipe_engine/properties', |
| 9 'recipe_engine/python', |
| 10 ] |
| 11 |
| 12 |
| 13 def RunSteps(api): |
| 14 git_revision = api.properties['git_revision'] |
| 15 repository = api.properties['repository'] |
| 16 |
| 17 api.python( |
| 18 'send hash to ts_mon', |
| 19 '/opt/infra-python/run.py', |
| 20 ['infra.tools.send_ts_mon_values', |
| 21 '--verbose', |
| 22 '--ts-mon-target-type=task', |
| 23 '--ts-mon-task-service-name=git_hash_metric', |
| 24 ('--string=\'{"name":"repository/hash", ' |
| 25 '"value": "%s", "repository": "%s"}\'' % (git_revision, repository)), |
| 26 ] |
| 27 ) |
| 28 |
| 29 |
| 30 def GenTests(api): |
| 31 yield (api.test('infra') + |
| 32 api.properties.git_scheduled( |
| 33 git_revision='deadbeefdeadbeefdeadbeefdeadbeefdeadbeef', |
| 34 repository='https://chromium.googlesource.com/infra/infra' |
| 35 ) |
| 36 ) |
| OLD | NEW |