I am having a gradle based spring boot project with screwdriver as CI/CD tool. The CI jobs are specified using templates. I have the requirement of testing the docker container health while PR build. I am thinking of following approach :
- Build the docker image
- Run the docker container on build server
- Calling the actuator health endpoint
- Stopping the container
- Return response based on step 3 result
With this approach, I am trying to figure out if there is a way through which I can actually catch the response of api call and then act accordingly.