Add ability to run build on test

I've added the ability to run the build on test as well as deploy and tidied a few bits up that I came across.

Open for discussion.
this just makes the docker context bigger, taking more time to transfer the context to the docker daemon, not too big a deal really. thanks for the contribution @davemackintosh