[GSOC 2020 PROJECT IDEA] Autobuild without Jenkinsfile

22 views
Skip to first unread message

Jeff Pearce

unread,
Feb 26, 2020, 9:00:48 AM2/26/20
to Jenkins Developers
This is an idea I've been thinking about for awhile, and I wanted to run it by the list to see if it's feasible. It's also possible someone else has looked into it in the past.

I've noticed that a lot of the projects I work with have a single Jenkinsfile, which they copy from repo to repo. I've been reducing the copy/paste with shared libraries, but I'm wondering if we could make it even easier.

I think it would useful if there was a plugin that could connect into the github branch plugin's scanning for Jenkinsfiles, and autodetect the type of project if there's no Jenkinsfile. From there it could reference some sort of template to build/test (or whatever) and generate a pipeline. This would allow branches to have some sort of build without need for any configuration in the branch. 

Thoughts? I'm happy to write it up if it seems feasible.

Best
Jeff

Jesse Glick

unread,
Feb 26, 2020, 10:30:18 AM2/26/20
to Jenkins Dev
> I think it would useful if there was a plugin that could connect into the github branch plugin's scanning for Jenkinsfiles, and autodetect the type of project if there's no Jenkinsfile. From there it could reference some sort of template to build/test (or whatever) and generate a pipeline. This would allow branches to have some sort of build without need for any configuration in the branch.

https://docs.cloudbees.com/docs/admin-resources/latest/pipelines-user-guide/pipeline-as-code#pipeline-custom-factories
https://github.com/jenkinsci/pipeline-multibranch-defaults-plugin/blob/master/README.md

Tomas Bjerre

unread,
Feb 26, 2020, 10:37:49 AM2/26/20
to Jenkins Developers
I prefer setting up a webhook from the Git service to Jenkins. And in Jenkins I recognize type. Type of repo in combination with the webhook content tells me what should be done. Zero code duplication. I wrote about it here:

Jeff

unread,
Feb 26, 2020, 10:53:53 AM2/26/20
to jenkin...@googlegroups.com
Thanks for the pointers - I suspected this wasn't a novel idea. I'll look at those plugins.

Jeff

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/021d80ba-aa46-4b9c-b2f2-f0c8cc8a75df%40googlegroups.com.

Aytunc Beken

unread,
Feb 26, 2020, 11:13:13 AM2/26/20
to Jenkins Developers
 Hey,

You can also check this plugin, https://plugins.jenkins.io/remote-file/. Idea is to have centralized Jenkins file for all multibranch projects. May be it can be helpful.
Reply all
Reply to author
Forward
0 new messages