Add cleanup steps in pipeline target.
Add cleanup as a element of a array in pipeline.
pipeline:
- name: start pipeline
type: command
command: echo ‘first step'
- name: start pipeline
command: echo ’second step'
- cleanup:
- name:
command: rm log/*
- cleanup and each step exist in the same array.
Add cleanup as a member of pipeline block (NOTE: need add steps member).
pipeline:
steps:
- name: start pipeline
type: command
command: echo ‘first step'
- name: start pipeline
command: echo ’second step'
cleanup:
- name: cleanup
command: rm log/*
- lost backward compatibility
Add cleanup as the top element in the configuration file.
pipeline:
- name: start pipeline
type: command
command: |
echo ‘first step'
- name: start pipeline
command: echo ’second step'
cleanup:
- name: cleanup
command: rm log/*
- this format cannot add another pipeline...
- fail in a stage in cleanup pipeline
- add stage property force(default=false)