mirror of https://github.com/axmolengine/axmol.git
[Jenkins][ci skip] Fix proxy address in post-build.py
This commit is contained in:
parent
26a4eaaac7
commit
be3f88c4ce
|
@ -5,9 +5,7 @@ import jenkinsapi
|
|||
from jenkinsapi.jenkins import Jenkins
|
||||
from jenkinsapi.constants import STATUS_SUCCESS
|
||||
|
||||
http_proxy = ''
|
||||
if(os.environ.has_key('HTTP_PROXY')):
|
||||
http_proxy = os.environ['HTTP_PROXY']
|
||||
payload_str = os.environ['payload']
|
||||
payload_str = payload_str.decode('utf-8','ignore')
|
||||
#parse to json obj
|
||||
payload = json.loads(payload_str)
|
||||
|
@ -31,6 +29,8 @@ if(result == STATUS_SUCCESS):
|
|||
else:
|
||||
data['state'] = "failure"
|
||||
|
||||
http_proxy = os.environ['HTTP_PROXY']
|
||||
http_proxy = ''
|
||||
if(os.environ.has_key('HTTP_PROXY')):
|
||||
http_proxy = os.environ['HTTP_PROXY']
|
||||
proxyDict = {'http':http_proxy,'https':http_proxy}
|
||||
requests.post(statuses_url, data=json.dumps(data), headers=Headers, proxies = proxyDict)
|
||||
|
|
Loading…
Reference in New Issue