Skip to main content
Version: Config V2

Azure DevOps - Scan your source code for feature flags

This section describes how to use the ConfigCat CLI in Azure DevOps Pipelines to automatically scan your source code for feature flag and setting usages and upload the found code references to ConfigCat.


  1. Create a new ConfigCat Management API credential and store its values in Azure DevOps Pipeline Variables with the following names: CONFIGCAT_API_USER, CONFIGCAT_API_PASS.

    Azure secrets
  2. Get your selected Config's ID.

  3. Create a new or open your existing azure-pipelines.yml file, and add the following job to your jobs definition. Don't forget to replace the PASTE-YOUR-CONFIG-ID-HERE value with your actual Config ID.

    - job: configcat_scan_and_upload
    container: configcat/cli:azure-devops-1.9.2
    vmImage: ubuntu-latest
    - checkout: self
    persistCredentials: true
    - script: configcat scan $(Build.Repository.LocalPath)
    --runner="ConfigCat Azure DevOps Job"
    name: scan_repository

If you are using a different VCS than Azure DevOps' Git, you should set the --file-url-template and --commit-url-template according to your VCS provider.

  1. Commit & push your changes.

Scan reports are uploaded for each branch of your repository that triggers the job.