Versions Compared

Key

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

The Custom Gate executes a custom Groovy script to determine status of the gate. This can be very useful to integrate other tools in pipeline to check readiness, or implement other custom logic. For example, you can write code to invoke a change management tool to determine the status of change request, or invoke issue tracking systems to update status of issue, etc).

...

Field

Description

Name

The name of the gate.

Description

An 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.  If no status is returned, SUCCESSFUL is implied by default.

Set milliseconds value in SCRIPT_CHECK_INTERVAL_MILLIS variable to control re-execution of script, otherwise re-execution on not completed script happens at 5 minute interval by default.

The script has access to variables and methods listed in Pipeline Groovy Variables and Methods. You can find these variables and methods while using the Groovy Editor.

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 and methods while using the Groovy Editor.

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).

On the Release Dashboard, any custom log messages that are executed in the script will be displayed. This can be done by utilizing the LOG function methods.

...

Make sure that the log level is properly set on the Admin Operations page in order for lower level log messages to show up such as fine.

...

Script Variables

Include Page
Pipeline Groovy Variables and Methods
Pipeline Groovy Variables and Methods