The assert condition implements the “python assert” behaviour

- type: assert
  name: REQUIRED. Must be unique among the list.
  assert: REQUIRED. The assert expression to evaluate.

Example

condition:
  - type: assert
    name: assert-condition
    assert: "{{ steps.service-is-up.results.status_code }} == 200"
  • If steps.service-is-up.results.status_code step returns 200 => assert 200 == 200 => the conditions returns False (since the assert pass)
  • If steps.service-is-up.results.status_code step returns 404 => assert 404 == 200 => the conditions returns True (since the assert fails)