0

How can i use shared library in jenkins for my dsl groovy scripts?

Most of my scripts have same steps except few changes in name and url, i do not want to create new script every time. Is there any way one script and do the job?

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
tarun
  • 17
  • 7

1 Answers1

0

Yes, you can create a Jenkins shared library and configure it in Jenkins.

The shared library is a git repository with defined structure where you declare your shared steps and you can include it in each pipeline script with @Library('<library name>').

VANAN
  • 488
  • 2
  • 5