Acceptance tests in the Jenkins pipeline
We already understand the idea behind acceptance testing and know how to configure the Docker Registry, so we are ready for its first implementation inside the Jenkins pipeline.
Let's look at the following diagram, which presents the process we will use:
The process goes like this:
- The developer pushes a code change to GitHub.
- Jenkins detects the change, triggers the build, and checks out the current code.
- Jenkins executes the commit phase and builds the Docker image.
- Jenkins pushes the image to the Docker Registry.
- Jenkins runs the Docker container in the staging environment.
- The Docker host on the staging environment needs to pull the image from the Docker Registry.
- Jenkins runs the acceptance test suite against the application running in the staging environment.
Information
For the sake of simplicity, we will run the...