Integration Testing in CICD Pipeline

Viewed 26

I have a spring boot project[App-Server], for which I want to test. I have created Mock Server docker image also hosted in AWS/Dockerhub for the same. Also I have used Rest Assured for API Testing. For this also docker image is available in AWS/Dockerhub.

Now before creating docker image for App-Server, I want to perform integration testing where I want Dockerfile.test for App-Server to load and create docker image, then on jenkins I want first the App-Server docker image to load, then Mock-Server docker image to load and after that the Rest Assured to load and do the testing which can be done via mvn test. Once the test is successful, I want to create the final docker image for App-Server.

Can this be done via Jenkins or AWS.

1 Answers

tldr: You have to create docker images, deploy to test system, and run e.g. integration test, before creating final release version.

Detailed answer: I suggest you to get a closer look with you use-case at git branching model e.g. gitflow and CI/CD including containerization of an application.

Let's look it with the following scenario. Once you fixed e.g. a bug in release branch and pushed to git, your e.g. Release Jenkins job pulls it and build docker images with the version of e.g. release candidate v1.0.0-rc1. Then you must promote/deploy built release candidate version to your e.g. release reference system with mocking systems (e.g. you can use aws for this) as it is illustrated here, i.e. inner loop. You only created final release version of e.g. 1.0.0 when test are completed successfully and deploy to e.g. production system, i.e. Outer loop.

Related