I'd like to write one Jenkinsfile to be shared between a number (~50) of pipelines/jobs, where each job handles the creation of a library from a specific source (git) repository.
Currently I have one job which uses SCons and build parameters to specify/calculate which repositories to build, but this involves cloning ~50 repositories each time and means features like the git change notes don't work (the repository with changes that is built isn't the repository containing the builder code, which typically just shows "No Changes").
Is there a better way to handle this situation? I see in this question (Modularizing CI/CD pipelines in Jenkins or in other tools?) that shared libraries are the suggested solution there, but whilst I can see that this simplifies the N Jenkinsfiles, it doesn't as far as I can tell reduce their number.
I'd like to avoid having any Jenkinsfiles in the source code repositories if possible (perhaps instead having information in the job configuration that boils down to "check out and run this Jenkinsfile from that other repository, as if it were in this one").