GithubHelp home page GithubHelp logo

isabella232 / scan-repository-orb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from configcat/scan-repository-orb

0.0 0.0 0.0 167 KB

ConfigCat's repository scanner CircleCI Orb. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.

Home Page: https://circleci.com/developer/orbs/orb/configcat/scan-repository

scan-repository-orb's Introduction

ConfigCat Scan Repository Orb

This CircleCI Orb is a utility that discovers ConfigCat feature flag & setting usages in your source code and uploads the found code references to ConfigCat.

For more information about repository scanning, see our documentation.

Setup

  1. Create a new ConfigCat Management API credential and save its values in CircleCI Environment Variables with the following names: CONFIGCAT_API_USER, CONFIGCAT_API_PASS.

    secrets

  2. Get the ID of your ConfigCat Config that you want to associate with your repository. The scanner will use this ID to determine which feature flags & settings to search for in your source code.

  3. Create a new CircleCI YAML config in your GitHub repository under the .circleci folder, and put the following snippet into it. Don't forget to replace the PASTE-YOUR-CONFIG-ID-HERE value with your actual Config ID.

    version: 2.1
    
    orbs:
      configcat: configcat/[email protected]
    
    workflows:
      main:
        jobs:
          - configcat/scan:
              config-id: PASTE-YOUR-CONFIG-ID-HERE # required
              file-url-template: 'https://github.com/your/repo/blob/{commitHash}/{filePath}#L{lineNumber}' # optional, used to generate links to your repository
              commit-url-template: 'https://github.com/your/repo/commit/{commitHash}' # optional, used to generate links to your repository
  4. Commit & push your changes.

The above example configures a workflow that executes the scan and code references upload on every git push event. Scan reports are uploaded for each branch of your repository that triggers the workflow.

Available Options

Parameter Description Required Default
api-host ConfigCat Management API host. api.configcat.com
api-user Name of the environment variable where the ConfigCat Management API basic authentication username is stored. CONFIGCAT_API_USER
api-pass Name of the environment variable where the ConfigCat Management API basic authentication password is stored. CONFIGCAT_API_PASS
config-id ID of the ConfigCat config to scan against.
file-url-template Template url used to generate VCS file links. Available template parameters: commitHash, filePath, lineNumber. Example: https://github.com/my/repo/blob/{commitHash}/{filePath}#L{lineNumber}
commit-url-template Template url used to generate VCS commit links. Available template parameters: commitHash. Example: https://github.com/my/repo/commit/{commitHash}
line-count Context line count before and after the reference line. (min: 1, max: 10) 4
sub-folder Sub-folder to scan, relative to the repository root folder.
verbose Turns on detailed logging. false

scan-repository-orb's People

Contributors

z4kn4fein avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.