Skip to content

Pipeline execution modes

The step execution mode defines the pipeline or step behavior on failure.

There is actually 3 step execution modes:

  • StopOnFailure (default)
  • JumpNextOnFailure
  • ContinueOnFailure

Stop on failure (default)

INFO

You do not need to explicitly set it because it is the default step execution mode.

If a command of the step fails. The whole step fails and stop the pipeline execution.

ts
const defaultMode: Step = {
  name: "stop the pipeline and run on_failure hooks on pipeline failure",
  options: {
    mode: "stop"
  }
};
const defaultMode: Step = {
  name: "stop the pipeline and run on_failure hooks on pipeline failure",
  options: {
    mode: "stop"
  }
};

Jump next on failure

This mode doesn't stop the execution flow and allows the next step to run.

If a command of the step fails, the execution of the step stops without stopping the pipeline execution. Then the next step is executed (the execution jumps to the next step).

ts
const nonBlocking: Step = {
  name: "jump to next step on failure",
  options: {
    mode: "jump_next"
  }
};
const nonBlocking: Step = {
  name: "jump to next step on failure",
  options: {
    mode: "jump_next"
  }
};

Continue on failure

This mode doesn't stop the execution flow and allows the next step to run.

If a command of the step fails, the next command is still executed, and so on until the last command of the step. Then the following step is executed.

ts
const forced: Step = {
  name: "execute next command on failure",
  options: {
    mode: "continue"
  }
};
const forced: Step = {
  name: "execute next command on failure",
  options: {
    mode: "continue"
  }
};