Maybe it sounds a bit crazy, but what about using git submodules. The jenkinsfile logic is outside the target repo's source as your initial requirement, although my experience with git submodules is not really something I'd say I enjoyed it... but it might be something to explore if it helps.
Besides of that, It looks like your requirement matches quite well with one of the enterprise plugins of CloudBees: - https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#pipeline-custom-factories Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/28478f04-a514-4a4f-b005-3dd3cced918f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.