Terminate docker compose when test container finishes

前端 未结 6 1150
梦毁少年i
梦毁少年i 2021-01-30 16:56

I am currently running a docker-compose stack for basic integration tests with a protractor test runner, a nodejs server serving a web page and a wildfly server serving a java b

6条回答
  •  面向向阳花
    2021-01-30 17:47

    You can do clean-up tasks using ensure on a task step in Concourse. https://concourse-ci.org/ensure-step.html

    In your case, you could add an ensure block after your protractor tests, and run a task to tear-down what was docker-compose'd earlier. You could also use an on-success step https://concourse-ci.org/on-success-step.html to do the teardown, and the docker-compose'd containers would be kept if your tests fail.

提交回复
热议问题