tidepool-org / tools

A place to put tooling and scripts that help when working on Tidepool stuff.
Other
11 stars 11 forks source link

Allow falling back to blip general feature flag env variables when not specifically enabled for a branch #91

Closed clintonium-119 closed 2 years ago

clintonium-119 commented 2 years ago

Context: when in development, enabling feature flags in Travis builds of blip is best done by specifying branches specifically. However, once we go to production with the feature, we likely want that enabled for all branches so that all of our non-production remote builds will have them enabled by default without needing their branches explicitly specified.

This PR allows setting, for instance, a generic RX_ENABLED env var in Travis which can be applied to all branches as a fallback for branches not listed in the RX_ENABLED_BRANCHES variable.

If not set in Travis, the default value in our artifact.sh deployment script will be false, so it will not be accidentally deployed to production. When the time comes to deploy to production, we'll be able to simply set the RX_ENABLED var in the Travis settings to true for "All Branches" and we're good to go.

I think this pattern will be flexible enough to suit our current needs and future feature flags as they come up.