Introducing the ConfigCat CircleCI Integration
Continuous Integration (CI) is a process by which new features and updates are continuously added to an application to keep it updated and secure. At the end of each cycle, the changes are deployed to end users. To prevent human errors, various automated tools are chained together to carry out this process. CircleCI is a broader tool that facilitates this, and it also provides an automated solution for managing your feature flags.
What is CircleCI?
CircleCI is a continuous integration tool. It is like a puzzle board allowing you to fit many automated tools and tasks together to help you achieve the overall goal of continuous integration.
Aside from the automated tasks offered officially by CircleCI, the company has also allowed third-party vendors to develop and integrate their own tools. As a result, developers have access to tools that help them automate various tasks in their continuous integration pipelines.
How Does It Work?
Knowing where CircleCI fits within the continuous integration tool chain is the first step to understanding how it works. It plays the role of a middleman, sitting between your code repositories, such as GitHub and BitBucket, and your end users.
When CircleCI is added to your code repository, it triggers a build process when changes are pushed via Git. During this, multiple tasks can be configured to execute on your code. These automated tasks can include formatting tools, linting tools, code scanning tools looking for vulnerabilities, code testing tools, and many more. After the build is complete, additional tasks can be configured to deploy your code to services like Docker, AWS, Google Cloud platform, and more.
ConfigCat and CircleCI
With the ever-changing landscape of software, there is always the need to keep your apps updated and secure with the release of new features and updates. As developers, sometimes we make typos and reference the incorrect feature flags that control these new updates and features in our code.
Because CircleCI can access, analyze and process your source code, you can configure it to automatically examine what and where feature flags are used within your code by installing ConfigCat's CircleCI Orb. This is a tool for validating feature flag references. You can use it to catch these mistakes before deploying your code to production, which can cause bugs. Here are the two ways it works:
Finding and reporting on missing references - This finds and reports on those feature flags used in your code that is not present in your ConfigCat dashboard.
Finding and reporting missing remote keys - This finds and reports on those feature flags present in your ConfigCat dashboard but are not being used in your code.
Removing Stale Feature Flags
A stale feature flag is a feature flag that has not been changed in a set amount of days. Knowing when to remove such feature flags from your ConfigCat dashboard and code is essential for keeping your code clean and avoiding technical debt. As we've discussed, ConfigCat’s CIrcleCI Orb enables you to do just this as well. Doing this as part of your software development workflow can save you valuable maintenance time and resources down the road.
When it comes to software development, feature flagging allows you to manage and release features seamlessly with little effort. Combining this with automation within your continuous integration pipeline can significantly improve how you manage features by informing you about the usage of your feature flags. Using ConfigCat's Orb in your CircleCI configuration, you can achieve this and catch critical errors caused by your feature flags before your end users do. I highly recommend giving the documentation a read and giving it a try after signing up for a free-tier ConfigCat account.
Did you find this article valuable?
Support Chavez Harris by becoming a sponsor. Any amount is appreciated!