-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Font Awesome and Replace with Iconify (#502)
- Loading branch information
1 parent
4eada75
commit fbc8e0c
Showing
71 changed files
with
1,392 additions
and
1,295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ title: Continuous Integration & Continuous Deployment | |
sidebar_label: CI/CD | ||
sidebar_position: 7 | ||
description: Feature flag guidelines that optimize continuous integration and deployment | ||
sidebar_custom_props: {icon: infinity} | ||
sidebar_custom_props: { icon: carbon:continuous-deployment } | ||
--- | ||
|
||
# Adopting Feature Flags for CI/CD | ||
|
@@ -43,17 +43,16 @@ Sometimes adding a feature flag results in a failed integration test. This could | |
Consider the `Use Server Storage` example we described earlier. Let’s say we have updated our Targeting Rules to enable `Use Server Storage` for internal users with an email domain of `@devcycle.com`. The `Use Server Storage` feature has been implemented in a React app as follows: | ||
|
||
```jsx | ||
const useServerStorage = useVariable('use-server-storage', false); | ||
const useServerStorage = useVariable('use-server-storage', false) | ||
|
||
if (useServerStorage) { | ||
retrieveDataFromServer() // function for using server storage | ||
} | ||
else { | ||
retrieveDataFromLocal() // function for using local storage | ||
retrieveDataFromServer() // function for using server storage | ||
} else { | ||
retrieveDataFromLocal() // function for using local storage | ||
} | ||
``` | ||
|
||
Now consider a test that expects to find `retrieveDataFromServer()` to have been called once. If the test does not receive the email domain `@devcycle.com` to send to the SDK, it will result in the fallback value of `false`, meaning that `retrieveDataFromServer()` would not be called, failing the test. | ||
Now consider a test that expects to find `retrieveDataFromServer()` to have been called once. If the test does not receive the email domain `@devcycle.com` to send to the SDK, it will result in the fallback value of `false`, meaning that `retrieveDataFromServer()` would not be called, failing the test. | ||
|
||
To fix the test, make sure to identify a user with the proper email, such as `[email protected]`. Similarly, if you have a feature that uses custom properties for targeting, make sure to pass in the corresponding properties when you identify the user. Providing user data within the tests ensures that the SDK receives the correct feature and variable information based on the targeting rules, even when the tests are run automatically through CircleCI. | ||
|
||
|
@@ -63,4 +62,4 @@ In this guide, we covered the following topics: | |
|
||
- creating a feature flag before coding the feature to optimize feature flag usage | ||
- using Targeting Rules to protect other users during integration and automated delivery | ||
- passing user data to conduct effective integration tests | ||
- passing user data to conduct effective integration tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fbc8e0c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
devcycle-docs – ./
devcycle-docs-devcyclehq.vercel.app
docs.devcycle.com
devcycle-docs.vercel.app
devcycle-docs-git-main-devcyclehq.vercel.app