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

href for attachments in Standard Output has incorrect URL #153

Closed
MJB222398 opened this issue Mar 12, 2025 · 0 comments
Closed

href for attachments in Standard Output has incorrect URL #153

MJB222398 opened this issue Mar 12, 2025 · 0 comments

Comments

@MJB222398
Copy link
Contributor

MJB222398 commented Mar 12, 2025

Jenkins and plugins versions report

Jenkins 2.492.1

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows and Ubuntu, problem is on both

Reproduction steps

Process a JUnit report that has attachments:

junit(
	testResults: "TestResults.xml",
	stdioRetention: "all",
	testDataPublishers: [[$class:'AttachmentPublisher']],
	skipPublishingChecks: true)

Navigate to a test case in the resulting report (one that has attachments) and see in the Standard Output that the URL in the href for the attachment is wrong:

http://localhost:8080/jenkins/job/attachments-fixes/5/testReportjob/attachments-fixes/5/testReport/junit/MyNamespace.Tests.JUnit/JunitPluginTests/TestCase1/attachments/Attachment.txt

See it repeats the "job/attachments-fixes/5/testReport" part and doesn't have a "/" between the repeated string either.

Expected Results

Expect the URL to be:

http://localhost:8080/jenkins/job/attachments-fixes/5/testReport/junit/MyNamespace.Tests.JUnit/JunitPluginTests/TestCase1/attachments/Attachment.txt

Actual Results

Attachment link was:

http://localhost:8080/jenkins/job/attachments-fixes/5/testReportjob/attachments-fixes/5/testReport/junit/MyNamespace.Tests.JUnit/JunitPluginTests/TestCase1/attachments/Attachment.txt

Anything else?

No response

Are you interested in contributing a fix?

Yes I'll do it

MJB222398 added a commit to MJB222398/junit-attachments-plugin that referenced this issue Mar 12, 2025
MJB222398 added a commit to MJB222398/junit-attachments-plugin that referenced this issue Mar 12, 2025
jonesbusy added a commit that referenced this issue Mar 12, 2025
bug: Correct hrefs for attachments in Standard Output (#153)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants