Skip to content

Commit

Permalink
add gha info to newly generated xml (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykim-1 committed Dec 7, 2023
1 parent 1c6ad41 commit d3474bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/test_report_upload_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def change_xml_report_to_tod_acceptable_version(file_name):
try:
new_tree = ET.ElementTree(new_testsuites)
new_tree.write(file_name, encoding="UTF-8", xml_declaration=True)
new_root = new_tree.getroot()
new_root.append(root.get('branch_name'))
new_root.append(root.get('gha_run_id'))
new_root.append(root.get('gha_run_number'))
new_root.append(root.get('release_tag'))

print("XML content successfully over-written to " + file_name)

except Exception as e:
Expand Down Expand Up @@ -75,4 +81,5 @@ def upload_to_linode_object_storage(file_name):
print('Error: The provided file name is empty or invalid.')
sys.exit(1)

change_xml_report_to_tod_acceptable_version(file_name)
upload_to_linode_object_storage(file_name)

0 comments on commit d3474bd

Please sign in to comment.