How to exit a Pipeline early without Failing

If a step returns an exit code 78 (EX_CONFIG) the runner will exit the pipeline with a success status and skip all subsequent steps (in-progress steps will be allowed to finish). In the below example, the second pipeline step returns exit code 78, which results in the final step being skipped.

kind: pipeline
name: default

steps:
- name: en
  image: alpine
  commands:
  - echo hello

- name: fr
  image: alpine
  commands:
  - echo bonjour
  - exit 78

- name: es
  image: alpine
  commands:
  - echo hola
1 Like