The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Pipeline: Groovy

load: Evaluate a Groovy source file into the Pipeline script

Takes a filename in the workspace and runs it as Groovy source text.

The loaded file can contain statements at top level or just load and run a closure. For example:

    def pipeline
    node('slave') {
        pipeline = load 'pipeline.groovy'
        pipeline.functionA()
    }
    pipeline.functionB()
    

Where pipeline.groovy defines functionA and functionB functions (among others) before ending with return this;

  • path : String

    Current directory (pwd()) relative path to the Groovy file to load.

parallel: Execute in parallel

java.nio.file.FileSystemNotFoundException

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.