github.com/facebookincubator/ttpforge@v1.0.13-0.20240405153150-5ae801628835/example-ttps/cleanup/failure.yaml (about) 1 --- 2 api_version: 2.0 3 uuid: cef0eb40-ec9e-421a-99e7-6bcb6aea1715 4 name: Basic Cleanup Demonstration 5 description: | 6 If a step fails, we stop executing new steps, and begin 7 cleaning up the prior steps in reverse order starting from the last 8 successful step. 9 steps: 10 - name: first_step 11 print_str: | 12 This step completes successfully, so its cleanup action will be enqueued. 13 cleanup: 14 print_str: Cleaning up first_step 15 - name: second_step 16 print_str: So does this step. 17 cleanup: 18 print_str: Cleaning up second_step 19 - name: third_step 20 inline: | 21 echo "This step fails, so it will not have its cleanup action run..." 22 notarealcommandwillcauseafailure 23 cleanup: 24 print_str: This won't run! 25 - name: fourth_step 26 print_str: | 27 Since the previous step failed, this step won't run at all... 28 cleanup: 29 print_str: ...and therefore its cleanup action won't run either.