mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix passing of env vars to Shippable.
This commit is contained in:
parent
b70d5d9aee
commit
9979a32e5c
1 changed files with 3 additions and 3 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue