In drone you can detach steps as seen here: https://docs.drone.io/config/pipeline/steps/
Example use case: I started a detached database. Some tests run against it. Then the db is no longer needed so I would like to terminate that detached step.
In drone you can detach steps as seen here: https://docs.drone.io/config/pipeline/steps/
Example use case: I started a detached database. Some tests run against it. Then the db is no longer needed so I would like to terminate that detached step.
I don't think one can do that in Drone. As mentioned in the service docs, detached steps are basically services. And also mentioned in the docs is:
It is important to note the service container exit code is ignored, and a non-zero exit code does not fail the overall pipeline. Drone expects service containers to exit with a non-zero exit code, since they often need to be killed after the pipeline completes.
So Drone doesn't care about services after they are started and as far as I know doesn't give us any options to stop them. But they will be automatically killed when all the steps are finished.
If you are trying to run two types of test in a single build and require different resources for each, I'll suggest look into multiple pipelines and create separate pipelines for them instead of starting/stopping services.