-
New Feature
-
Resolution: Not A Defect
-
Minor
-
None
We run everything with `docker-compose` in our Jobs and we have to add a `docker-compose down` to the end of each stage, which takes unnecessary time from the jobs completion.
It would be great if we could add a closure to `cleanWs` in order to run some commands deferredly at the end of the build
cleanWs() { docker-compose -f docker-compose.ci.yml down --volumes --remove-orphans }
Note that this is unrelated to cleaning workspace. you can hook custom cleanup using finally in scripted pipeline or post directive in declarative pipeline: https://stackoverflow.com/questions/36651432/how-to-implement-post-build-stage-using-jenkins-pipeline-plug-in