Can the URL for a Global Pipeline Library be a relative local disk path?

I’m trying to get our Jenkins setup to be relatively portable, with few-to-no hardwired paths. Our shared library in the “Global Pipeline Libraries” section of the Jenkins system settings currently has a full pathname to a local Git repository on the disk. I’ve tried changing that to a relative path from the Jenkins home, but it complains. Is there any way to have a relative path there?

I don’t see why not? it would be very very confusing though, context for jenkins ui would be $JENKINS_HOME, but any job would likely be $JENKINS_HOME/jobs/$jobname/workspace/ or something, so not very relative.

Why wouldn’t you just use an scm so its external?

it does use SCM but it’s still on the local disk. I couldn’t figure out how to specify the git url relatively.

But … I realized that I can just load the libary dynamically rather than setting it in the settings menu, which lets me use environment variables to specify its location…

I believe you have to whitelist the shared library via gui before you can load it in a pipeline.

By scm I was thinking cloud (github/gitlab/bitbucket) or self host(gitlab/gitea/etc) where it would be an http/ssh url