Support scriptable teardown section in circle.yml

circle.yml

#1

Scenario:
I want certain actions to always execute at the end of a build, regardless of if failed or at what stage it failed. Currently there is a teardown stage but it only runs the CircleCI specific actions as opposed to the ones specified in the pre: section.

This would help support scenarios such as sending metrics at the end of a run (see
How can I collect metrics from CircleCI?) or ensuring proper shut down of certain processes (such as SauceConnect, see https://github.com/circleci/sauce-connect/issues/8)


#2

We also need this feature. We have a bunch of cleanup to do regardless of the state of the build (and we also want it to run if the build is cancelled…)


#3

+1. I have some internal (AWS) resources that I need to use. I’m opening up a security group, which I close at the end of the test. In some failure scenarios, it doesn’t run. Having a section with a reasonable guarantee of running regardless of the test results would be hugely helpful.


#4

Same here. Any news about it? Or a workaround, at least?


#5