walter-cd / walter

Tiny deployment pipeline
http://walter-cd.net
Apache License 2.0
438 stars 39 forks source link

Cleanup stage #78

Closed github1 closed 9 years ago

github1 commented 9 years ago

Is it currently possible to define a stage that always runs at the end of a pipeline? The use case I have in mind is to clean up resources created during the pipeline execution. For example:

pipeline:
  -  stage_name: start pipeline
     stage_type: command
     command: |
       echo 'starting process'
     run_after:
       - stage_name: a_stage_that_can_fail
         stage_type: command
         command: exit 1
  - stage_name: clean_up
    stage_type: command
    command: |
      echo 'clean_up'
ainoya commented 9 years ago

No, it cannot execute the final stage like cleanup process. (With ./walter -f option, stage execution sequence could be continued by ignoring any errors, but it may not be help what you want to do.)

I think the cleanup feature could be really needed, so I'm going to plan some implementation about that later.

takahi-i commented 9 years ago

I will tackle this issue. The following is the implementation image of cleanup feature.

https://gist.github.com/takahi-i/f7b75bcd8c02f9ed2ae7

takahi-i commented 9 years ago

Fix with #97