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

First-class multibranch project recogniser #145

Open
jglick opened this issue Dec 10, 2021 · 5 comments
Open

First-class multibranch project recogniser #145

jglick opened this issue Dec 10, 2021 · 5 comments
Milestone

Comments

@jglick
Copy link

jglick commented Dec 10, 2021

If you implement https://javadoc.jenkins.io/plugin/workflow-multibranch/org/jenkinsci/plugins/workflow/multibranch/AbstractWorkflowBranchProjectFactory.html and https://javadoc.jenkins.io/plugin/workflow-multibranch/org/jenkinsci/plugins/workflow/multibranch/AbstractWorkflowMultiBranchProjectFactory.html in a Jenkins plugin, you can create an org folder with the specified project recogniser (.travis.yml) without needing any job generation. Commits adding or modifying this file will be honoured immediately.

@samrocketman
Copy link
Owner

samrocketman commented Dec 11, 2021

Nice! I currently have the following plugin which filters for branches. It would be great to create projects too https://github.com/jenkinsci/scm-filter-jervis-plugin

I hadn't known this before. I'll work on implementing it.

@jglick
Copy link
Author

jglick commented Dec 13, 2021

If you implement the project recognizer, you do not need a custom trait like that—branches (or PRs) will be mapped to branch projects iff they have the right file.

Check https://www.jenkins.io/doc/developer/extensions/branch-api/#branchprojectfactory & https://www.jenkins.io/doc/developer/extensions/branch-api/#multibranchprojectfactory for ideas, as well as the proprietary https://docs.cloudbees.com/docs/admin-resources/latest/pipelines/pipeline-as-code#custom-pac-scripts

@jglick
Copy link
Author

jglick commented Dec 13, 2021

Filed as https://issues.jenkins.io/browse/JENKINS-67363 since that is probably more precise.

@samrocketman
Copy link
Owner

samrocketman commented Dec 15, 2021

There's still YAML filtering in the .jervis.yml such as https://github.com/jenkinsci/scm-filter-jervis-plugin#whitelist-or-blacklist-branches-and-tags

It will need to parse the YAML to determine if the branch or tag is buildable or excluded via filter.

@samrocketman
Copy link
Owner

I haven't forgotten this. It has just taken me a while to get this project up to date with 100% coverage. I prefer to release with full coverage and I'm going to work toward smaller releases. This next release is going to be a major one.

@samrocketman samrocketman added this to the jervis-2.2 milestone Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants