What is next?

The example here is purely academic, and parts of the solution are a bit hacky. In a real company, Jenkins would be installed in a dedicated server and would have many more tasks to build and release. To orchestrate all of this, proper management of generated artifacts is needed. As mentioned earlier, some of the solutions that companies are adopting are tools such as Artifactory or private instances of Docker Registry to store Docker images of the services. Whatever the storage of choice, the procedure will remain the same—compile, test, build, archive. It's just a matter of configuration.

For the sake of brevity, some parts that required new code have been omitted and are left for the reader to complete as an exercise. Here are some ideas of how to continue:

  • Create some tests for the REST controller.
  • There is an issue in the random number generator—it is not random at all. Fork the thimblerig-service project, create a test to reproduce the issue, fix it, and release a new version of the service by using the recently-created build project on Jenkins.
  • Use Docker.

All the code snippets and the rest of the project files required can be found online in the following repository: https://bitbucket.org/alexgarcia/tdd-java-thimblerig-service

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.136.142