Can drone run a separate container for tests and wait for its exit status?

Hi,

Bulding a nodejs project, I’d like to integrate another maven tests project before the deployment.
Can I use a service container or other method and use its exit code (as in success or failure) to decide whether to deploy or fail?

Thanks a lot for the help!

If I understand correctly you want to trigger a build for another project (ie a downstream project) and wait for the build to complete. If the downstream build fails, you want to fail the current build. Is this correct?

In this case it is possible but al things in drone are delegated to plugins. You could create a plugin that uses the Drone API to launch a build and them waits for it to complete by polling every N seconds for its completion.

This plugin (mentioned in the other thread) lets you trigger a build but does not wait for its completion https://github.com/UKHomeOffice/drone-trigger

So you would probably need a new plugin for this. The good news is that writing plugins for Drone is crazy simple. I recommend reading through the documentation at http://readme.drone.io/plugins/

Perfect. Thanks a lot Brad!

@omerxx i’d be interested if you succeed in using plugin advised by @bradrydzewski as i failed trying to use it :slight_smile:

let me know :slight_smile: