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

Generic lookup of files and flags #202

Merged

Conversation

jonesbusy
Copy link
Collaborator

Make metadata more generic. In order to have more information about the presence or not of file and activate some recipes or not depending on conditions

Sorry @sridamul but we will get some conflict on #201 I let you choose which on we merge first

Testing done

Automated tests. An checking a plugin contains following data

{
  "pluginName": "ASM API Plugin",
  "flags": [
    "SCM_HTTPS",
    "MAVEN_REPOSITORIES_HTTPS"
  ],
  "commonFiles": [
    "POM",
    "JENKINSFILE"
  ],
  "otherFiles": [
    "src/main/resources/index.jelly",
    "src/test/java/io/jenkins/plugins/asm/ASMSmokeTest.java",
    ".mvn/extensions.xml",
    ".github/dependabot.yml",
    ".github/workflows/cd.yaml",
    ".github/workflows/jenkins-security-scan.yml",
    ".github/CODEOWNERS",
    ".mvn/maven.config",
    "README.md",
    "LICENSE.md",
    ".gitignore"
  ],
  "jenkinsVersion": "2.440.3",
  "parentVersion": "4.86",
  "properties": {
    "revision": "9.7",
    "changelist": "999999-SNAPSHOT",
    "jenkins.baseline": "2.440",
    "jenkins.version": "${jenkins.baseline}.3",
    "gitHubRepo": "jenkinsci/${project.artifactId}-plugin",
    "spotless.check.skip": "false"
  },
  "key": "plugin-metadata",
  "path": "asm-api"
}

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

@jonesbusy jonesbusy requested a review from a team as a code owner August 20, 2024 09:25
// language=groovy
groovy(
"""
buildPlugin()
Copy link
Collaborator Author

@jonesbusy jonesbusy Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sridamul Will be perfect to merge our 2 PRs ;)

Copy link
Contributor

@sridamul sridamul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Idea! Thank you very much.

@jonesbusy jonesbusy added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Aug 20, 2024
@sridamul
Copy link
Contributor

We can merge this, I will fix other conflicts on #201

@jonesbusy jonesbusy merged commit 48da94b into jenkins-infra:main Aug 20, 2024
14 checks passed
@jonesbusy jonesbusy deleted the feature/archetype-common-file branch August 20, 2024 09:49
@jonesbusy
Copy link
Collaborator Author

Thanks, I will not touch the visitors (only add more Flags and CommonFile which are not extracted and should not cause conflicts

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

Successfully merging this pull request may close these issues.

2 participants