Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TMT_REPORT_ARTIFACTS_URL in Polarion report plugin #2785

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading