Mode when script will execute. Each mode has a slightly different set of variables and result handling.

Default variables

All modes include these variables:
mode
Mode type
container
Build wrapper instance

SETUP

build
hudson.model.AbstractBuild
launcher
hudson.Launcher
listener
hudson.model.BuildListener
If result non-null hudson.model.Environment, will replace the default environment. This will prevent TEAR_DOWN and ENVIRONMENT_VARIABLES from being called.

TEAR_DOWN

build
hudson.model.AbstractBuild
launcher
hudson.Launcher
If result non-null boolean value, when true allows the build to continue, false to abort.

DECORATE_LAUNCHER

build
hudson.model.AbstractBuild
launcher
hudson.Launcher
listener
hudson.model.BuildListener
If result non-null hudson.Launcher, replaces the launcher.

DECORATE_LOGGER

build
hudson.model.AbstractBuild
logger
java.io.OutputStream
If result non-null java.io.OutputStream, replaces the logger.

BUILD_VARIABLES

Configure build variables.
build
hudson.model.AbstractBuild
vars
java.util.Map<String,String>
Result ignored.

ENVIRONMENT_VARIABLES

Configure environment variables.
build
hudson.model.AbstractBuild
vars
java.util.Map<String,String>
Result ignored.

ALL

Invokes the same script for each mode. Use the mode variable to switch.