Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Custom gate executes provided Groovy script to determine status of gate. This can be very useful to integrate additional tools in to pipelinepipeline. You can write code to invoke change management tool to determine status of change request, or invoke issue tracking system to update status of issue etc.

Pipeline will execute RUNNING gate at regular interval, and gate will be considered complete only when it returns SUCCESSFUL or FAILED.

Field

Description

Gate Name

The name of the gate.

DescriptionAn optional description for the gate.
Groovy Script

Groovy script to provide implementation of Gate. Return SUCCESSFUL, RUNNING or FAILED to indicate status of Gate.

This can be used to provide customized implementation in pipeline to interface with external system or do any other programmatic checks.

Precondition

An optional Groovy script which determines whether the gate or step is applicable during execution. The script has access to variables and methods listed in Pipeline Groovy Variables and Methods. You can find these variables methods using Variable Lookup help.

The script must return true if the gate is applicable, or false otherwise.  If no script is provided, the default is to return true (applicable).

...