Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: scripts/slave/recipes/infra/git_hash_metric.py

Issue 1880343003: Added git-hash-metrics builder and recipe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fixed presubmit errors Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipes/infra/git_hash_metric.py
diff --git a/scripts/slave/recipes/infra/git_hash_metric.py b/scripts/slave/recipes/infra/git_hash_metric.py
new file mode 100644
index 0000000000000000000000000000000000000000..03d79d8f1d3e71f5387d8b0fbc5701cc26be8bb6
--- /dev/null
+++ b/scripts/slave/recipes/infra/git_hash_metric.py
@@ -0,0 +1,36 @@
+# Copyright 2016 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.
+
+from recipe_engine.recipe_api import Property
+
+DEPS = [
+ 'recipe_engine/properties',
+ 'recipe_engine/python',
+]
+
+
+def RunSteps(api):
+ git_revision = api.properties['git_revision']
+ repository = api.properties['repository']
+
+ api.python(
+ 'send hash to ts_mon',
+ '/opt/infra-python/run.py',
+ ['infra.tools.send_ts_mon_values',
+ '--verbose',
+ '--ts-mon-target-type=task',
+ '--ts-mon-task-service-name=git_hash_metric',
+ ('--string=\'{"name":"repository/hash", '
+ '"value": "%s", "repository": "%s"}\'' % (git_revision, repository)),
+ ]
+ )
+
+
+def GenTests(api):
+ yield (api.test('infra') +
+ api.properties.git_scheduled(
+ git_revision='deadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
+ repository='https://chromium.googlesource.com/infra/infra'
+ )
+ )
« no previous file with comments | « masters/master.chromium.infra.cron/slaves.cfg ('k') | scripts/slave/recipes/infra/git_hash_metric.expected/infra.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698