-1

We have our shared libraries on gitlab called mainlibrary and it has a lot of groovy files.

Example in mainlibrary gitlab repo we have the following files.

startup_pipeline.groovy
cleanup_pipeline.groovy

In one of our Jenkins job we need to include multiple groovy files in the Jenkinsfile. Is this possible?

This is how the Jenkinsfile looks like:

@Library('mainlibrary')_
startup_pipeline(email:'example@example.com')

Can I include the second groovy function file into this Jenkinsfile like this?

@Library('mainlibrary')_
startup_pipeline(email:'example@example.com'),
cleanup_pipeline(email:'example@example.com')
user630702
  • 495
  • 10
  • 32

1 Answers1

1

Yes, according to the official docs you can include as many custom steps (each in their own .groovy file) in your shared library as you like.

jayhendren
  • 1,014
  • 5
  • 12