From a048656d0833b23f171ded8fa909c87e457444ec Mon Sep 17 00:00:00 2001 From: Zach Taylor Date: Wed, 26 Apr 2017 20:35:27 -0400 Subject: [PATCH] Adding gitsha as a step kwarg and as a step env for https://github.com/servo/saltfs/issues/597 --- buildbot/master/files/config/factories.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildbot/master/files/config/factories.py b/buildbot/master/files/config/factories.py index ff77cc72..e9b5da8c 100644 --- a/buildbot/master/files/config/factories.py +++ b/buildbot/master/files/config/factories.py @@ -59,7 +59,7 @@ def __init__(self, build_steps): repourl=SERVO_REPO, mode="full", method="clean", retryFetch=True ), - CheckRevisionStep(), + CheckRevisionStep() ] + build_steps # util.BuildFactory is an old-style class so we cannot use super() # but must hardcode the superclass here @@ -230,6 +230,11 @@ def make_step(self, command): else: step_desc += [arg] + # Add Git SHA for tracking testing failures + if step_class == steps.Test: + step_env['GIT_SHA'] = self.getProperty('got_revision') + step_kwargs['gitSha'] = self.getProperty('got_revision') + if step_class != steps.ShellCommand: step_kwargs['description'] = "running" step_kwargs['descriptionDone'] = "ran"