For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Get started
    • Overview
    • Onboarding
    • Get started
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • AgentControl
    • AgentControl
    • Manage AgentControl
  • Feature flags
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
      • Bitbucket code references
      • CircleCI code references
      • Custom configuration with ld-find-code-refs
      • GitHub code references
      • GitLab code references
    • Contexts
    • Segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
    • Applications and app versions
    • Change history
    • Restoring previous flag versions
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • Observability metrics
    • Product analytics events
    • LLM observability
    • Alerts
    • Dashboards
    • Service map
    • Vega for auto-remediation
    • Observability MCP server
    • Search specification
    • Observability settings
    • Observability integrations
  • Experimentation
    • Experimentation
    • Experiment metric types
    • Experiment configuration
    • Managing experiments
    • Analyzing experiments
    • Multi-armed bandits
    • Holdouts
  • Metrics and events
    • Metrics in LaunchDarkly
    • Creating metrics
    • Metric groups
    • Events
    • Autogenerated metrics
  • Warehouse native
    • Warehouse native metrics
    • Setting up external warehouses
    • Creating experiments using warehouse native metrics
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Feature previews
    • Billing and usage
    • Changelog
Sign inTry it free
LogoLogo
On this page
  • Overview
  • Prerequisites
  • Set up the LaunchDarkly CircleCI integration
  • Additional configuration options
Feature flagsCode references

CircleCI code references

Was this page helpful?
Previous

Custom configuration with ld-find-code-refs

Next
Built with
Code references are available to customers on select plans

Code references are only available to customers on select plans. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Overview

This topic explains how you can use the ld-find-code-refs utility with CircleCI to automatically populate code references in LaunchDarkly.

Prerequisites

To complete this procedure, you must have the following prerequisites:

  • An API access token with write permissions for the code-reference-repository resource, either through a base role, a LaunchDarkly-provided project role, or another role that you have created. To learn more, read API access tokens and Code reference actions.
  • The LaunchDarkly CircleCI Orb.
Circle Workflow version 2.1 or higher is required

To use CircleCI code references, you must be using a Circle Workflow version of 2.1 or higher. If you’re using an earlier version, try manually using the utility binary or docker image to create your own workflow job. To learn more, read Execution via CLI in the ld-find-code-refs documentation.

Set up the LaunchDarkly CircleCI integration

To set up the LaunchDarkly orb in CircleCI:

  1. Save your API access token as an environment variable titled LD_ACCESS_TOKEN in your CircleCI project settings. To learn more, read CircleCI’s documentation.

  2. Create a YAML file in CircleCI with configuration including LaunchDarkly’s Orb. Here’s an example minimal configuration using LaunchDarkly’s Orb:

    YAML
    1version: 2.1
    2
    3orbs:
    4 launchdarkly: launchdarkly/ld-find-code-refs@2.12.0
    5
    6workflows:
    7 main:
    8 jobs:
    9 - launchdarkly/find-code-references:
    10 proj_key: $YOUR_LAUNCHDARKLY_PROJECT_KEY
    11 repo_type: github # can be 'bitbucket', 'custom', 'github', or 'gitlab'
    12 repo_url: $YOUR_REPO_URL # used to generate links to your repository

Additional configuration options

There are additional configuration options for the code references orb.

To skip searching files and directories, use an .ldignore file.

To configure custom delimiters and aliases for your flag keys, or to set other advanced configuration, use the .launchdarkly/coderefs.yaml file.