This is an example for a pipeline for Concourse CI. It is intended to be used as a base to build high quality pipelines.
It is using a sample JavaScript project, but it can be easily adapted to serve any other language.
ServerSpec allows you to run unit tests for infrastructure. You can use it to test that your containers, both build and production, are being created correctly.
Running it in a pipeline is notoriously difficult, and you end up running in the Docker in Docker issue. This repository contains some ready-to-use blocks that can make your life easier.
In order to run these tests, you need:
- A Docker image that can run docker-in-docker and has
ruby
installed - Building that image as part of the pipeline
- A task that runs that image with elevated privileges
- That script requires a special entrypoint
- The run script itself is making sure the image we built is accessible and running all the tests that we have defined