| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from recipe_engine.recipe_api import Property | 5 from recipe_engine.recipe_api import Property |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'recipe_engine/properties', | 8 'recipe_engine/properties', |
| 9 'recipe_engine/python', | 9 'recipe_engine/python', |
| 10 ] | 10 ] |
| 11 | 11 |
| 12 | 12 |
| 13 def RunSteps(api): | 13 def RunSteps(api): |
| 14 git_revision = api.properties['git_revision'] | 14 git_revision = api.properties['git_revision'] |
| 15 repository = api.properties['repository'] | 15 repository = api.properties['repository'] |
| 16 | 16 |
| 17 api.python( | 17 api.python( |
| 18 'send hash to ts_mon', | 18 'send hash to ts_mon', |
| 19 '/opt/infra-python/run.py', | 19 '/opt/infra-python/run.py', |
| 20 ['infra.tools.send_ts_mon_values', | 20 ['infra.tools.send_ts_mon_values', |
| 21 '--verbose', | 21 '--verbose', |
| 22 '--ts-mon-target-type=task', | 22 '--ts-mon-target-type=task', |
| 23 '--ts-mon-task-service-name=git_hash_metric', | 23 '--ts-mon-task-service-name=git_hash_metric', |
| 24 '--ts-mon-task-job-name=default', |
| 24 ('--string=\'{"name":"repository/hash", ' | 25 ('--string=\'{"name":"repository/hash", ' |
| 25 '"value": "%s", "repository": "%s"}\'' % (git_revision, repository)), | 26 '"value": "%s", "repository": "%s"}\'' % (git_revision, repository)), |
| 26 ] | 27 ] |
| 27 ) | 28 ) |
| 28 | 29 |
| 29 | 30 |
| 30 def GenTests(api): | 31 def GenTests(api): |
| 31 yield (api.test('infra') + | 32 yield (api.test('infra') + |
| 32 api.properties.git_scheduled( | 33 api.properties.git_scheduled( |
| 33 git_revision='deadbeefdeadbeefdeadbeefdeadbeefdeadbeef', | 34 git_revision='deadbeefdeadbeefdeadbeefdeadbeefdeadbeef', |
| 34 repository='https://chromium.googlesource.com/infra/infra' | 35 repository='https://chromium.googlesource.com/infra/infra' |
| 35 ) | 36 ) |
| 36 ) | 37 ) |
| OLD | NEW |