Validating Config as Code projects
Blog post from Octopus Deploy
Matthew Casperson's article discusses the challenges of balancing end-user control with the ability to implement incremental changes in downstream Config as Code projects. It introduces a Git-based workflow to manage modifications, where changes must be made in feature branches and validated through pull requests against the default branch. The article offers a practical example of using an automated validation script written in TypeScript for the Octopus Configuration Language (OCL), a subset of Hashicorp's HCL language. This script checks for minimum deployment process requirements and is designed to be executed by CI environments on major Git platforms, such as GitHub Actions, GitLab Pipelines, and BitBucket Pipelines. The piece further explains how the validation workflow can ensure compliance with specific deployment criteria, leveraging a Node.js script to enforce rules before merging changes. Additionally, the article highlights that while Gitea lacks a native execution environment for such scripts, its integration with external services via webhooks allows for effective validation through a proxy server setup.