Read time: 1 minute
Last edited: Jun 29, 2020
This topic explains how you can use the
ld-find-code-refs utility with CircleCI to automatically populate code references in LaunchDarkly.
To complete this procedure, you must have the following prerequisites:
- An API access token with
writerpermissions. To learn more, read API access tokens.
- The LaunchDarkly CircleCI Orb.
To set up the LaunchDarkly orb in CircleCI:
- Save your API access token as an environment variable titled
LD_ACCESS_TOKENin your CircleCI project settings. To learn more, read CircleCI's documentation.
- Create a YAML file in CircleCI with configuration including LaunchDarkly's Orb. Here's an example minimal configuration using LaunchDarkly's Orb:
1version: 2.123orbs:4 launchdarkly: email@example.com:7 main:8 jobs:9 - launchdarkly/find-code-references:10 proj_key: $YOUR_LAUNCHDARKLY_PROJECT_KEY11 repo_type: github # can be 'github', 'bitbucket', or 'custom'12 repo_url: $YOUR_REPO_URL # used to generate links to your repository
You can learn more about configuration options in CircleCI's documentation. To learn more, read Explore Orbs / launchdarkly/ld-find-code-refs.