I started implement Jenkins shared libraries and trying to write my jenkinsfile with intellij as my ide.
How do I get functions from the shared lib repository to the other repository which holds the jenkins file inside it.
Just to clarify things are working for me when running from jenkins but I need an easy way to write my jenkins file with the usage of functions from the shared-lib repo.
You can create jenkins shared library as a maven project (or gradle, it doesn't matter) with specific group id, artifact id and version. You should perform 'mvn install' whenever you change your shared library (this goal used to add shared library jar artifact to the local maven repository). In another repository where you will write your jenkins file, you should also create a maven project and just add your shared library as a maven dependency. And now you can use code from the shared library in your jenkins file.