Skip to content

[Question] Contributing compay changes to the library #725

@ggarcia24

Description

@ggarcia24

Hello!

First of all please let me congratulate for this awesome tool, after finding it, my workflow for developing Shared Libraries and Jenkins pipelines has changed for the best, so big kudos to the people working on this, it's amazing!

The company that I work for is using this library heavily (I'm the one pushing it, because I want to ensure the quality of the code we write for Jenkins pipelines), as soon as I started to use it more and more, I noticed that there are some use cases we were are using that were not supported (like using matrix stages in DeclarativePipelines), I added support for it and started to ask Legal to be able to share the code with you 🫠 after 1+ year I'm finally able to do so 🥳

One of the issues that I'm facing is that I added too many changes 🙈 🫠

Let me try to summarize all of those here:

  • Use org.jenkins-ci.jpi plugin and classgraph to create mocks for plugins declared in build.gradle with an implementation on how to create stubs/mocks for Steps with default responses and hamcrest matchers
  • Support for Mocking imported class
  • Support for Matrix stages
  • Support for getting coverage reports (using JaCoCo)

NOTE: None of these changes break backward compatibility or require any type of change on the already existing tests.


I try to ask in the jenkins community, but it seems that the maintainers are currently busy, so while analyzing what would be the best way to move forward I started to check the open issues, and I was able to "group" them in the following way:

Because some of the changes I made solve some of those issues, I think the best way forward would be to "split" the changes and focus on the biggest list of issues first (Make stubs/mocks """smarter""") and then work the way down that list

This way the PRs will be smaller and focused, what do you think?

Best regards
Gonzalo G.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions