mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge pull request #15479 from NissimHadar/22415-fixBackTraceUploadFailures
Case 22145: Fix BackTrace upload failures
This commit is contained in:
commit
bf24a083fc
1 changed files with 36 additions and 0 deletions
36
tools/ci-scripts/hifi_backtrace_post.py
Normal file
36
tools/ci-scripts/hifi_backtrace_post.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Parameters:
|
||||
# 1 - $BACKTRACE_UPLOAD_TOKEN
|
||||
# 2 - $SYMBOLS_ARCHIVE
|
||||
# 3 - $RELEASE_NUMBER
|
||||
#
|
||||
import sys
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
|
||||
print("Running python script to upload to BackTrace")
|
||||
|
||||
post_headers = {}
|
||||
post_headers['Content-Type'] = 'application/json'
|
||||
post_headers['Expect'] = ''
|
||||
|
||||
post_url = 'https://highfidelity.sp.backtrace.io:6098/post?format=symbols&token=' + sys.argv[1] + '&upload_file=' + sys.argv[2] + '&tag=' + sys.argv[3]
|
||||
|
||||
try:
|
||||
post_data = open(sys.argv[2], 'rb')
|
||||
except:
|
||||
print('file ' + sys.argv[2] + ' not found')
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
post_request = urllib.request.Request(post_url, post_data, post_headers)
|
||||
except:
|
||||
print('urllib.request.Request failed')
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
post_response = urllib.request.urlopen(post_request)
|
||||
except:
|
||||
print('urllib.request.urlopen failed')
|
||||
exit(1)
|
||||
|
||||
print("Upload to BackTrace completed without errors")
|
Loading…
Reference in a new issue