Versions Compared

Key

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

...

In case there is a finally command in the pipeline, this will be considered before exiting. See Finally.

Example:

Code Block
pipeline:
  - exit:
      if: ${2 > 1}

...

The command finally can be used in a pipeline in order to make sure a set of commands is executed in any case at the very end of a pipeline. Even if an error has been occured or the pipeline execution has been cancelled by an exit command. This approach is useful for example in case you need to cleanup data or would like to get informed about the pipeline execution result in any case.

...

In case you would like to make sure , a condition in the pipeline is true, you can use the assert command to check that. In case the given condition is wrong, the pipeline execution will end and an error will the be thrown. This is especially useful in writing tests.

...