github.com/facebookincubator/ttpforge@v1.0.13-0.20240405153150-5ae801628835/example-ttps/cleanup/basic.yaml (about)

     1  ---
     2  api_version: 2.0
     3  uuid: efb70470-4365-4be5-83e0-a009c0f2d49a
     4  name: Basic Cleanup Demonstration
     5  description: |
     6    Every time a step completes successfully, its cleanup action is enqueued.
     7    Then, the enqueued cleanup steps are run in reverse order
     8    ("last in, first out") whenever:
     9      1. The TTP Completes Successfully, or...
    10      2. A Step Fails
    11  steps:
    12    - name: first_step
    13      print_str: |
    14        This step completes successfully, so its cleanup action will be enqueued.
    15      cleanup:
    16        print_str: "Cleaning up first_step"
    17    - name: second_step
    18      print_str: |
    19        This step has no cleanup action defined, so it will be skipped during cleanup
    20    - name: third_step
    21      print_str: |
    22        This step uses an `inline:` action instead of a `print_str:` action
    23        as its cleanup action - you may use any of TTPForge's supported action types
    24        as a cleanup action.
    25      cleanup:
    26        description: You should fill in the descriptions of custom cleanup actions
    27        inline: echo "Cleaning up third_step"