diff --git a/contrib/buildbot/server.py b/contrib/buildbot/server.py --- a/contrib/buildbot/server.py +++ b/contrib/buildbot/server.py @@ -255,6 +255,7 @@ staging_ref = get_mandatory_argument('stagingRef') target_phid = get_mandatory_argument('targetPHID') + revision_id = get_mandatory_argument('revisionId') # Get the configuration from master config = yaml.safe_load(phab.get_file_content_from_master( @@ -278,6 +279,9 @@ properties = [{ 'name': 'env.ABC_BUILD_NAME', 'value': build_name, + }, { + 'name': 'env.ABC_REVISION', + 'value': revision_id, }] build_id = tc.trigger_build( 'BitcoinABC_BitcoinAbcStaging', diff --git a/contrib/buildbot/test/test_endpoint_buildDiff.py b/contrib/buildbot/test/test_endpoint_buildDiff.py --- a/contrib/buildbot/test/test_endpoint_buildDiff.py +++ b/contrib/buildbot/test/test_endpoint_buildDiff.py @@ -21,6 +21,7 @@ def __init__(self): self.stagingRef = "refs/tags/phabricator/diff/1234" self.targetPHID = "PHID-HMBT-123456" + self.revisionId = "D1234" def __str__(self): return "?{}".format("&".join("{}={}".format(key, value) @@ -70,6 +71,10 @@ 'name': 'env.ABC_BUILD_NAME', 'value': build.name, }, + { + 'name': 'env.ABC_REVISION', + 'value': data.revisionId, + }, { 'name': 'env.harborMasterTargetPHID', 'value': data.targetPHID,