From c2a9cc43c093593e36731f5e1b31c477c4ec39a6 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 18 Oct 2018 17:15:15 -0700 Subject: [PATCH] Fix passing of env vars to Shippable. (cherry picked from commit 9979a32e5c6d55345a8f87115ed86a94d86d8398) --- test/utils/shippable/tools/run.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/utils/shippable/tools/run.py b/test/utils/shippable/tools/run.py index 7eb60bcda12..4a74076d535 100755 --- a/test/utils/shippable/tools/run.py +++ b/test/utils/shippable/tools/run.py @@ -99,7 +99,7 @@ def main(): # new build data = dict( - globalEnv=['%s=%s' % (kp[0], kp[1]) for kp in args.env or []] + globalEnv=dict((kp[0], kp[1]) for kp in args.env or []) ) if args.branch: @@ -108,10 +108,10 @@ def main(): data['runId'] = args.run url = 'https://api.shippable.com/projects/%s/newBuild' % project_id - response = requests.post(url, data, headers=headers) + response = requests.post(url, json=data, headers=headers) if response.status_code != 200: - raise Exception(response.content) + raise Exception("HTTP %s: %s\n%s" % (response.status_code, response.reason, response.content)) print(json.dumps(response.json(), indent=4, sort_keys=True))