Company
Date Published
Author
Ricardo N Feliciano
Word count
564
Language
English
Hacker News points
None

Summary

CircleCI 2.0 introduced significant advancements in continuous integration and delivery, including a new configuration file format, an emphasis on Docker images, and the ability to build locally via the CircleCI CLI. This post focuses on the CLI's validation feature, which addresses the common issue of builds failing due to minor errors in configuration files. By running the `circleci config validate -c .circleci/config.yml` command, developers can validate their configuration locally before committing changes, thus avoiding repetitive fix, commit, push, and fail cycles. The process can be further streamlined by using a Git pre-commit hook to automate the validation, ensuring the configuration file works as expected before every commit, preventing invalid configurations from being pushed to the repository.