Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docker image generation through fabric8 docker maven plugin
the plugin is used in each of the 2 maven profiles (`standalone` and `all-in-one`) to pick up the corresponding Dockerfile (`Dockerfile_standalone` and `Dockerfile_all-in-one`) and build the appropriate docker image (`restcomm/restcomm` and `restcomm/connect` respectively). For the moment - and this is perhaps a point for discussion - the plugin's `build` goal is bound to the `pre-integration-test` phase, as the fabric8 philosophy suggests you build a docker image (which is the resulting binary artifact from your maven build) and then you `start` it - still within the `pre-integration-test` phase - (together with all of its dependencies, e.g. database docker containers, 3rd party dependencies, etc.) so that you can then run the `verify` phase tests against the running system. There is also a binding to the plugin's `stop` goal, in the `post-integration-phase`, which tears down the above setup. I am leaving some of the above bindings commented out, on purpose, so you, oh dear reviewer, can get a better idea of how this works, in case you're not familiar. Whether we choose to adopt this setup (which in my previous experience is pretty damn awesome!! ) largely depends however on what tests we already run in the `verify` phase and whether we would care to move some to other phases - or even other jenkins pipeline stages. If we don't want to adopt the above approach, then we can consider binding the docker image creation in some other phase of mvn lifecycle.
- Loading branch information