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

Automate archetypes updates via updatecli #6672

Open
NotMyFault opened this issue Sep 12, 2023 · 8 comments
Open

Automate archetypes updates via updatecli #6672

NotMyFault opened this issue Sep 12, 2023 · 8 comments

Comments

@NotMyFault
Copy link
Member

Similar to docker and maven updates in documentation sources, archetypes releases should be automated too, to make PRs like #6671 obsolete.

https://github.com/jenkinsci/archetypes is released to the central repository.

@dduportal
Copy link
Contributor

Good idea: it has releases as "source fo truth" (https://github.com/jenkinsci/archetypes/releases) and it can be conditionally checked with the "Maven" kind in updatecli

@biru-codeastromer
Copy link
Contributor

Hi @dduportal ,
I’ve been exploring issue #6672 to automate archetype updates using Updatecli.
Here’s my proposed approach so you can look if is good :

1.Configure Updatecli to fetch the latest Jenkins archetypes from repo.jenkins-ci.org/releases.
2.Verify if new versions exist in the Maven repository.
3.Update relevant files (e.g., documentation).
4.Run Updatecli in Dry Run mode to validate the configuration.

The draft changes I thought is :

sources:
  archetypes:
    kind: maven
    spec:
      repository: "repo.jenkins-ci.org/releases"
      groupid: "org.jenkins-ci.archetypes"
      artifactid: "jenkins-plugin-archetype"

conditions:
  archetypes:
    name: "Check if archetypes version exists in Maven repository"
    kind: maven
    spec:
      repository: "repo.jenkins-ci.org/releases"
      groupid: "org.jenkins-ci.archetypes"
      artifactid: "jenkins-plugin-archetype"

targets:
  archetypes:
    name: "Update archetypes version in documentation"
    kind: yaml
    spec:
      file: [I will put the actual path here]
      key: "archetypes.version"

@biru-codeastromer
Copy link
Contributor

Could you please review this approach and let me know if it aligns with your expectations? Once I get your confirmation, I did be happy to help .
Thank you!

@gounthar
Copy link
Contributor

Hello @biru-codeastromer ,

Did you try that manifest on the repo, at least the source and condition?

@biru-codeastromer
Copy link
Contributor

Hi @gounthar ,

I’ve been working on automating the archetypes updates using Updatecli, but I’m encountering an issue where Updatecli cannot find the Maven metadata for the empty-plugin archetype. Here’s what I’ve done so far:
Based on the pom.xml file, I used:
1.Group ID: io.jenkins.archetypes
2.Artifact ID: empty-plugin

I also checked the repository URL: https://repo.jenkins-ci.org/releases/.

But when I ran Updatecli, I got the following error:

WARNING: getting latest version: URL "https://repo.jenkins-ci.org/releases/io/jenkins/archetypes/empty-plugin/maven-metadata.xml" not found or in error
ERROR: ✗ no latest version for the Maven Artifact io.jenkins.archetypes/empty-plugin

Could you please confirm is the empty-plugin archetype published to the Maven repository?if it’s a snapshot version, should I use the snapshot repository (https://repo.jenkins-ci.org/snapshots/) instead?

@biru-codeastromer
Copy link
Contributor

I did try to implement the snapshot repo link too but got same errors .

@dduportal
Copy link
Contributor

@biru-codeastromer if you plan to work on issues without joining the usual SIG and/or syncing with the usual contributors, it will be hard for us to help you when you need it. The reason is because we are working on other tasks and our attention span is limited: the more context switch we have to do, the less tasks we can finish.

We do really appreciate your help and your enthusiasm, but you have to be careful in the way you approach. The risk is that you might miss information, or the review of your PR might be delayed.

As for this particular issue, the required information is written in the definition: it means you have to read, check and plan carefully before jumping in writing code.
Please take the required time to understand the issue and/or decide not to work on it.
It is not labelled "good first issue" for reasons :)

@biru-codeastromer
Copy link
Contributor

Thank you for the constructive feedback, @dduportal. I apologize for not syncing properly and will take the time to carefully review the issue and related files. I’ll also look into discussing more in our groups to collaborate better. Before proceeding, I’ll share my plan for feedback to ensure I’m on the right track.
I will keep this mind moving forward in dealing issues like this . 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants