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

Unified Diff: recipes.py

Issue 2231253002: Add the ability to dump initial recipe properties. (Closed) Base URL: https://github.com/luci/recipes-py@recipes-proto-config
Patch Set: Rebarse Created 4 years, 4 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
« no previous file with comments | « recipe_engine/arguments_pb2.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipes.py
diff --git a/recipes.py b/recipes.py
index addf2c37641d6d8d9af543483e81cbb2eb224cf6..e835e8bc314c26ba9461da27a9a3a9550e2acede 100755
--- a/recipes.py
+++ b/recipes.py
@@ -157,6 +157,12 @@ def run(package_deps, args, op_args):
sys.stdout, emit_timestamps=(args.timestamps or
op_args.annotation_flags.emit_timestamp)))
with stream_engine:
+ # Emit initial properties if configured to do so.
+ if op_args.annotation_flags.emit_initial_properties:
+ with stream_engine.new_step_stream('Initial Properties') as s:
+ for key in sorted(properties.iterkeys()):
+ s.set_build_property(key, json.dumps(properties[key], sort_keys=True))
+
try:
ret = recipe_run.run_steps(
properties, stream_engine,
« no previous file with comments | « recipe_engine/arguments_pb2.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698