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

fix JENKINS-69410: Links to Attached Artifacts broken #854

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

mhoffrog
Copy link
Contributor

@mhoffrog mhoffrog commented Nov 18, 2024

Issue(s)

  1. As mentioned by recent comments on JENKINS-69410 there are still broken URL links created for artifacts deployed. Those links are related to artifacts that are attached in addition to a modules primary artifacts.
    e.g. -sources.jar artifacts attached by the Maven sources plugin do not get proper links in case the deploy plugin will create time stamped filenames deployed (which is the most common usage for deployed snapshot artifacts).
  2. If the deploy repository URL configured is ending with a / character, then the deployed artifact URL link is containing a //. This issue is fixed by this PR as well.

Root cause

s. details in the commit comment

Testing done

This has been tested manually for a couple of more or less complex multi module Maven projects with a couple of our companies product specific file types attached.
Existing unit tests did not have been updated yet with this PR since of time constraints.
@bguerin If you could help by giving some hint what test files and unit tests to focus on for an update, maybe I can find some time to cover this.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@mhoffrog mhoffrog requested a review from a team as a code owner November 18, 2024 12:10
@mhoffrog
Copy link
Contributor Author

@bguerin
Copy link
Contributor

bguerin commented Nov 22, 2024

Hello

Thanks for the PR, I will look at it this week-end

@bguerin
Copy link
Contributor

bguerin commented Nov 25, 2024

unit tests fixed, I will look at the build error, seems it is time to switch baseline ...

mhoffrog and others added 2 commits November 25, 2024 20:09
- pipeline-maven:
  - pipeline/maven/util/XmlUtils.java:
    - add missing attachedMavenArtifact.setVersion(version from deployed artifact)

- pipeline-maven-api:
  - pipeline/maven/MavenArtifact.java:
    - avoid double // in deployed artifact URL
      if deploy repository URL ends with /
@bguerin bguerin merged commit e15caab into jenkinsci:master Nov 25, 2024
17 checks passed
@bguerin bguerin self-assigned this Nov 25, 2024
@bguerin bguerin added the bug label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants