Integration Tests with Microservices (NodeJS), Jenkins and Docker

How would you typically configure Jenkins to build microservices (multiple NodeJS services, Rabbit, Mongo, etc), then test those services all together ?

Let’s say I’ve the following services:

  • Docker 1.12 Swarm Mode - Load balance tasks of the same service on single node
  • Hostname for website running inside Docker
  • Docker containers not using host DNS in boot2docker
  • How to efficiently manage docker storage drive in Centos 7
  • running docker compose on swarm
  • Attach terminal and launch docker compose?
    • RabbitMQ
    • Mongo
    • NodeJS Service 1
    • NodeJS Service 2

    Each of them has their own tests (unit and integration) and their Dockerfile.

    I want to configure Jenkins in a way that it would enable me to clone all theses services, run them all at the same time in different containers with Rabbit and Mongo containers along them. It would then run the tests for each of those services (they do generate TAP and coverage reports). Then take those reports for the TAP/Coverage Jenkins plugins. If it works out, commit the image and push it to the docker registry.

    I’ve been lying around Stack and Google and I don’t really see an easy way to get there that would not imply tons of bash.

    Maybe I see it in the wrong way, any input is more than welcome!

  • Route over docker bridge network to docker overlay network
  • Bundling from Github in a Dockerfile
  • How to enable the Docker Remote API on Windows
  • docker service failed after changing storage driver
  • docker : container exited when using -v option
  • Docker CMD evaluation with ENTRYPOINT
  • One Solution collect form web for “Integration Tests with Microservices (NodeJS), Jenkins and Docker”

    You can test using an “consumer driven contract” approach.
    Like mentioned here:
    using this project:

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.