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

JENKINS-59813 pipeline-maven JacocoPublisher handle excludes properly #764

Merged
merged 1 commit into from Mar 6, 2024

Conversation

enapps-enorman
Copy link
Contributor

This is a proposed solution for JENKINS-59813

The jacoco report published by pipeline includes classes that should have been excluded.

If the pom declares "excludes" in the jacoco-maven-plugin configuration, then those patterns should be forwarded on to the JacocoPublisher so the generated report excludes those.

The proposed changes will look for any "excludes" xml elements in the jacocoPrepareAgentEvent elements and collect any patterns in there which are then passed through to the JacocoPublisher at the end.

Testing done

The JacocoReportPublisherTest was updated to exercise the impacted code path. Also manual testing of the locally built plugin solved my use case.

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options

@enapps-enorman enapps-enorman requested a review from a team as a code owner February 27, 2024 03:51
@bguerin bguerin self-assigned this Mar 6, 2024
@bguerin bguerin added the bug label Mar 6, 2024
@bguerin bguerin merged commit 08b63fa into jenkinsci:master Mar 6, 2024
16 checks passed
@bguerin
Copy link
Contributor

bguerin commented Mar 6, 2024

Thanks for you work and sorry for the delay !

@enapps-enorman enapps-enorman deleted the issue/JENKINS-59813 branch March 7, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants