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

Update the BOM Recipe to Accommodate the Latest Archetype #122

Open
gounthar opened this issue Jul 25, 2024 · 4 comments
Open

Update the BOM Recipe to Accommodate the Latest Archetype #122

gounthar opened this issue Jul 25, 2024 · 4 comments
Labels
chore enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Comments

@gounthar
Copy link
Collaborator

What feature do you want to see added?

Current Situation

We are currently using the existing OpenRewrite BOM recipe for our plugin modernization efforts.

Question

Does this recipe cover the case of the latest Jenkins archetype?

Potential Actions

If the current recipe covers the latest archetype:

  • No action required.

If the current recipe does not cover the latest archetype:

  1. Create a meta-recipe that:

    • Adds the jenkins.baseline property
    • Uses this property to reference the BOM
  2. Modify the existing recipe by:

Precedent

The OpenRewrite team has been receptive to contributions in the past. They accepted our contribution when the archetype for the Jenkinsfile changed months ago.

Next Steps

  1. Verify if the current recipe covers the latest archetype.
  2. If not, decide between creating a meta-recipe or modifying the existing one.
  3. If modifying the existing recipe, prepare a PR for the OpenRewrite repository.

Your thoughts and feedback on this approach are welcome.

Upstream changes

No response

Are you interested in contributing this feature?

No response

@gounthar gounthar added enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted chore labels Jul 25, 2024
@gounthar
Copy link
Collaborator Author

gounthar commented Jul 26, 2024

We should also modify it so we switch to 2.440.x instead of 2.426.x.
Cf jenkinsci/gitlab-plugin#1671.

🤔

Except if the recipe has already been updated.
I must admit I can't see where the Jenkins versions are fetched from in https://github.com/openrewrite/rewrite-jenkins/blob/main/src/main/java/org/openrewrite/jenkins/AddPluginsBom.java .

@jonesbusy
Copy link
Collaborator

From what I understand is the declarative recipe openrewrite/rewrite-jenkins@30e736b that define the minimum version

The "real" version is fetch here : https://github.com/openrewrite/rewrite-jenkins/blob/main/src/main/java/org/openrewrite/jenkins/Jenkins.java#L43

Basially it doesn't check the property by itself but the managed version of org.jenkins-ci.main:jenkins-core artifact (that is influenced by the jenkins.version property

@jonesbusy
Copy link
Collaborator

Downstream PR openrewrite/rewrite#4404

@jonesbusy
Copy link
Collaborator

Other PR related to new archetype openrewrite/rewrite-jenkins#73 will not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

No branches or pull requests

2 participants