Skip to content

Commit

Permalink
Use TMT_REPORT_ARTIFACTS_URL in Polarion report plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Matyas authored and psss committed Mar 25, 2024
1 parent 1292ee0 commit ed761bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tmt/steps/report/polarion.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class ReportPolarionData(tmt.steps.report.ReportStepData):
help="""
Location of the logs for this test run,
also uses environment variable TMT_PLUGIN_REPORT_POLARION_LOGS.
Ultimately also uses environment variable TMT_REPORT_ARTIFACTS_URL.
"""
)

Expand Down Expand Up @@ -239,6 +240,9 @@ def go(self) -> None:
properties['polarion-custom-arch'] = self.step.plan.provision.guests()[0].facts.arch
if template:
properties['polarion-testrun-template-id'] = template
logs = os.getenv('TMT_REPORT_ARTIFACTS_URL')
if logs and 'polarion-custom-logs' not in properties:
properties['polarion-custom-logs'] = logs
testsuites_properties = ElementTree.SubElement(xml_tree, 'properties')
for name, value in properties.items():
ElementTree.SubElement(testsuites_properties, 'property', attrib={
Expand Down

0 comments on commit ed761bf

Please sign in to comment.