Skip to main content

Bitbucket: Feature Flag Code Usages

Get the integration on the Bitbucket Marketplace

Bitbucket Pipelines Pipe: DevCycle Code References

Code References of DevCycle Variables pushed to DevCycle

With this Bitbucket pipeline, 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

Example Output

YAML Definition

Add the following snippet to your bitbucket-pipelines.yml file:

branches:
main:
- step:
script:
- pipe: devcyclehq/bitbucket-code-refs-pipe:1.0.3
variables:
PROJECT_KEY: '<string>'
CLIENT_ID: '<string>'
CLIENT_SECRET: '<string>'

Variables

  • 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
VariableUsage
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

  1. Create a new Project & a new Feature
  2. Grab the PROJECT_KEY in Projects, and find your specific project name & key
  3. Grab the CLIENT_ID in Settings, under API AUTHENTICATION
  4. Grab the CLIENT_SECRET in Settings, under API AUTHENTICATION

Examples

Example:


- pipe: devcyclehq/bitbucket-code-refs-pipe:1.0.3

variables:

PROJECT_KEY: $PROJECT_KEY

CLIENT_ID: $CLIENT_ID

CLIENT_SECRET: $CLIENT_SECRET

Support

The pipe is maintained by support@devcycle.com.

If you are reporting an issue, please include:

  • the version of the pipe
  • relevant logs and error messages
  • steps to reproduce