Hi there,
I’m quite new to CircleCI so please excuse me if this question somewhat sounds generic.
I’m creating spring boot applications that communicate with databases on other machines.
For this kind of applications I want to define a pipeline that could look like this:
- Code Push to CVS
- Build application
- Run application tests
- Deploy application to remote server
My plan is to spin up two docker containers. One of them contains the application, and the other one contains a mysql db instance for example that the application uses.
So far everything would work great, except for the tests.
I’m simply not able to execute my application tests and use the remote mysql instance for this.
On the other side, It might be better for testing to create a docker container that contains both, the application and the mysql instance on one machine. Then my tests would work as the hostname “localhost” should be familiar for the mysql connection.
But then I would have different docker containers (testing and deployment).
Is there some sort of best practice when working with Spring Boot projects and CircleCI? All I found so far in the internet showed some basic examples that did not include communication to remote machines while testing.