Bitbucket Pipe - Scan source code for unused feature flags
ConfigCat's Bitbucket Pipe has the ability to scan your source code for feature flag and setting usages and upload the found code references to ConfigCat.
This feature makes the elimination of the technical debt easier, as it can show which repositories reference your feature flags and settings in one centralized place on your Dashboard.
Here you can find more details about how this feature works.
This section describes how to use ConfigCat's Bitbucket Pipe to automatically scan your source code for feature flag and setting usages and upload the found code references to ConfigCat. You can find more information about Bitbucket Pipelines here.
Create a new ConfigCat Management API credential and store its values in secure pipeline variables with the following names:
Get your selected Config's ID.
Add the following snippet to the script section of your
bitbucket-pipelines.ymlfile. Don't forget to replace the
PASTE-YOUR-CONFIG-ID-HEREvalue with your actual Config ID.
- pipe: configcat/scan-repository-pipe:1.3.0
# LINE_COUNT: '3' # optional
# SUB_FOLDER: '/src' # optional
# EXCLUDE_KEYS: > # optional
# VERBOSE: 'true' # optional
Commit & push your changes.
Scan reports are uploaded for each branch of your repository that triggers the job.
|ID of the ConfigCat config to scan against.||☑|
|ConfigCat Management API host.|
|Context line count before and after the reference line. (min: 1, max: 10)||4|
|Sub-folder to scan, relative to the repository root folder.|
|List of feature flag keys that must be excluded from the scan report.|
|Turns on detailed logging.||false|