I'm using the Pipeline plugin to spawn a Docker image that I could run some tests against. I have a Node.js project that is basically a REST service. I have some tests written with Mocha that I would like to run once the server is up. This seems like the right plugin to accomplish this and the Groovy DSL is incredibly flexible to work with.
So far, I have created a Jenkins slave to spin up the Docker image and now I am ready to test. What would be the best way to invoke these tests against the Docker image? Should I shell into the machine and just run them there or run them from the slave somehow? There is also the question of the test results that I would like to report on.
Thanks for any recommendations on this.