Pipe: Feature Flag Code Usages
Overview
With this Bitbucket pipe, your DevCycle dashboard will be updated to display code snippets for each DevCycle variable usage within your project.
Note: This is intended to run when pushing changes to your main branch
Example Output
Usage
Add the following snippet to your bitbucket-pipelines.yml
file:
branches:
main:
- step:
script:
- pipe: devcyclehq/devcycle-code-refs-pipe:1.2.0
variables:
PROJECT_KEY: '<string>'
CLIENT_ID: '<string>'
CLIENT_SECRET: '<string>'
Your DevCycle API credentials and project token are required to update the DevCycle dashboard.
Inputs
- To add variables to be used in the bitbucket-pipelines.yml, an admin must add Repository Variables in Repository Settings > Repository Variables, and then add all necessary variables as secured variables
Variable | Description |
---|---|
PROJECT_KEY (*) | Your DevCycle project key, see Projects |
CLIENT_ID (*) | Your organization's API client ID, see Organization Settings |
CLIENT_SECRET (*) | Your organization's API client secret, see Organization Settings |
(*) = required variable.
Prerequisites
- Create a new Project & a new Feature
- Grab the PROJECT_KEY in Projects, and find your specific project name & key
- Grab the CLIENT_ID in Settings, under
API AUTHENTICATION
- Grab the CLIENT_SECRET in Settings, under
API AUTHENTICATION
Configuration
The patterns used to identify references to variables in your code are fully customizable. This action uses the DevCycle CLI under the hood, for details on how to configure the pattern matcher see the CLI configuration.