Company
Date Published
Author
Eddie Webbinaro
Word count
1366
Language
English
Hacker News points
None

Summary

Testing within a CI/CD pipeline often overlooks the server-level validation of configurations and services, which can be effectively managed using Goss, a YAML-based tool, and its Docker-focused counterpart, dgoss. By integrating Goss into a CircleCI pipeline, teams can execute tests against custom Docker images to ensure they are not shipping faulty images. The process involves setting up dgoss, creating a Docker image, and using commands like `goss add` to append tests to a `goss.yaml` file, which is later copied locally for further examination. Tests can verify file existence, command outputs, and handle dynamic content using pattern matching, with all results consolidated into a `goss.yaml` specification file. Running tests locally and in a CI environment, such as CircleCI, involves setting up appropriate paths and installing Goss, ensuring the tests are incorporated into the automated pipeline. The goal is to maintain robust server-level testing within the CI/CD process, thereby minimizing the risk of deploying problematic server configurations.