http://qs321.pair.com?node_id=11116615

josthi has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I can see Jenkins shared libraries are written in Groovy. Is there any way to create shared libraries in Perl for Jenkins? Cheers, Joseph

Replies are listed 'Best First'.
Re: Perl shared library for Jenkins
by haukex (Archbishop) on May 09, 2020 at 20:00 UTC
    I can see Jenkins shared libraries are written in Groovy. Is there any way to create shared libraries in Perl for Jenkins?

    There are a few modules on CPAN that have to do with Jenkins. Perhaps one of them is appropriate for you?

Re: Perl shared library for Jenkins
by davido (Cardinal) on May 10, 2020 at 15:49 UTC

    In my experience it's best to keep the Groovy based Jenkinsfile small, and to allow it to invoke more robust, testable scripts. I write the scripts that the Jenkinsfile invokes as modulinos, so that they can be tested more in isolation.


    Dave

      Sorry for late reply Thanks Dave. Will follow the same. Cheers, Joseph