The Pipeline DSL syntax

There are a number of global variables, keywords, and directives that can be used inside any Pipeline, for example:

  • env: Environment variables
  • params: Parameters set when configuring the pipeline
  • currentBuild: Information about the current build, such as results, display name, and so on
The complete Global Variables list can be found at /pipeline-syntax/globals.

There are keywords which are available only inside steps. For example, the sh keyword allows you to specify some arbitrary shell command to run, and you can use echo to print something into the console output.

The DSL syntax can also be extended. For example, the JUnit plugin adds the junit step to the Pipeline vocabulary, which allows your step to aggregate ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.