As part of a series of blog posts about Feature Flags, we needed to create our own custom Feature flags system. Our main application will call our feature flags service, asking for the state of particular feature flags based on their environment – for example, if we were implementing a new menu and wanted to use the feature flag in dev, the dev website will ask if the dev version of the new menu feature flag is enabled. Current features include
- A REST API service to retrieve the state of the feature flag
- A simple website to toggle the feature flags
- Automated unit, integration and functional tests
- Tracking to record the total number of uses and last date/time the feature flag was used
Uses .NET 6, MSTest, and Selenium. A GitHub action runs the CI/CD process.
Currently the CI/CD process:
- builds the code
- runs the unit tests
- deploys the web service and website to a web app staging slot
- runs Selenium smoke tests on the staging slot to ensure the project is working as expected
- swaps the staging and production slots
Dependabot runs daily to check for dependency upgrades, and will automatically create a pull request, and approve/close it if all of the tests pass successfully
Feel free to fork and/or add any relevant feature suggestions, bug reports, or features!