1. configcat/flag_reference_validator@1.0.3

configcat/flag_reference_validator@1.0.3

Sections
Job and commands for discovering ConfigCat feature flag usages in your source code and validating them against your own ConfigCat configuration dashboard. Documentation: https://github.com/configcat/flag-reference-validator
Created: July 28, 2019Version Published: September 30, 2019Releases: 3
Org Usage:
< 25

Orb Quick Start Guide

Use CircleCI version 2.1 at the top of your .circleci/config.yml file.

1 version: 2.1

Add the orbs stanza below your version, invoking the orb:

1 2 orbs: flag_reference_validator: configcat/flag_reference_validator@1.0.3

Use flag_reference_validator elements in your existing workflows and jobs.

Opt-in to use of uncertified orbs on your organization’s Security settings page.

Usage Examples

job-default-configuration

Executes the reference validatior job with default parameters.

1 2 3 4 5 6 7 version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 workflows: main: jobs: - configcat/validate-flag-references

job-complex-configuration

Executes the reference validatior job with verbose logging and fails the execution on validation warnings.

1 2 3 4 5 6 7 8 9 version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 workflows: main: jobs: - configcat/validate-flag-references: debug: true fail-on-warnings: true

install-validator-command

Installs the ConfigCat validator and it's dependencies on the current environment. It uses `apt-get` and `pip` so it must be executed on an environment which has those.

1 2 3 4 5 6 7 8 9 version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 jobs: build: docker: - image: circleci/python:2.7 steps: - configcat/install-validator

execute-validation-command

Installs the ConfigCat validator and executes the reference validation command with custom configuration on a python based docker environment.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 jobs: build: docker: - image: circleci/python:2.7 steps: - checkout: path: /repo - configcat/install-validator - configcat/execute-validation: debug: true fail-on-warnings: true scan-directory: /repo

custom-executor

Executes the reference validatior in a job which uses the preconfigured configcat job executor.

1 2 3 4 5 6 7 8 9 version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 jobs: build: executor: configcat/default steps: - checkout - configcat/execute-validation

Jobs

validate-flag-references

Scans the repository for ConfigCat feature flag references. Displays the missing feature flag keys in CircleCI's build log.

Show job Source
PARAMETER
DESCRIPTION
REQUIRED
DEFAULT
TYPE
configcat-api-key
The api key of your ConfigCat project.
No
CONFIG_CAT_API_KEY
env_var_name
configcat-cdn-server
The domain name of the ConfigCat CDN where you ConfigCat configuration file is stored.
No
cdn.configcat.com
string
fail-on-warnings
Signals a build error in CircleCI when the validation fails. By default only warnings are showed.
No
false
boolean
debug
Turns on detailed logging.
No
false
boolean

Commands

install-validator

Installs the ConfigCat flag reference validator tool and its dependencies.

Show command Source
PARAMETER
DESCRIPTION
REQUIRED
DEFAULT
TYPE
validator-version
The version of the ConfigCat flag reference validator pypi package.
No
1.0.3
string

execute-validation

Scans the repository for ConfigCat feature flag references. Displays the missing feature flag keys in CircleCI's build log.

Show command Source
PARAMETER
DESCRIPTION
REQUIRED
DEFAULT
TYPE
configcat-api-key
The api key of your ConfigCat project.
No
CONFIG_CAT_API_KEY
env_var_name
scan-directory
The directory to scan for flag references.
No
.
string
configcat-cdn-server
The domain name of the ConfigCat CDN where you ConfigCat configuration file is stored.
No
cdn.configcat.com
string
fail-on-warnings
Signals a build error in CircleCI when the validation fails. By default only warnings are showed.
No
false
boolean
debug
Turns on detailed logging.
No
false
boolean

Executors

default

The Docker container to use when executing the reference validator job.

Show executor Source
PARAMETER
DESCRIPTION
REQUIRED
DEFAULT
TYPE
docker-image-version
The version of the ConfigCat flag reference validator docker image.
No
1.0.3
string

Orb Source

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 # This code is licensed from CircleCI to the user under the MIT license. # See here for details: https://circleci.com/developer/ja/orbs/licensing version: 2.1 description: "Job and commands for discovering ConfigCat feature flag usages in your source code and validating them against your own ConfigCat configuration dashboard. Documentation: https://github.com/configcat/flag-reference-validator" examples: job-default-configuration: description: Executes the reference validatior job with default parameters. usage: version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 workflows: main: jobs: - configcat/validate-flag-references job-complex-configuration: description: Executes the reference validatior job with verbose logging and fails the execution on validation warnings. usage: version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 workflows: main: jobs: - configcat/validate-flag-references: debug: true fail-on-warnings: true install-validator-command: description: Installs the ConfigCat validator and it's dependencies on the current environment. It uses `apt-get` and `pip` so it must be executed on an environment which has those. usage: version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 jobs: build: docker: - image: circleci/python:2.7 steps: - configcat/install-validator execute-validation-command: description: Installs the ConfigCat validator and executes the reference validation command with custom configuration on a python based docker environment. usage: version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 jobs: build: docker: - image: circleci/python:2.7 steps: - checkout: path: /repo - configcat/install-validator - configcat/execute-validation: debug: true fail-on-warnings: true scan-directory: /repo custom-executor: description: Executes the reference validatior in a job which uses the preconfigured configcat job executor. usage: version: 2.1 orbs: configcat: configcat/flag_reference_validator@1.0.3 jobs: build: executor: configcat/default steps: - checkout - configcat/execute-validation executors: default: description: The Docker container to use when executing the reference validator job. parameters: docker-image-version: description: The version of the ConfigCat flag reference validator docker image. type: string default: 1.0.3 docker: - image: configcat/flag-reference-validator:<< parameters.docker-image-version >> commands: install-validator: description: Installs the ConfigCat flag reference validator tool and its dependencies. parameters: validator-version: description: The version of the ConfigCat flag reference validator pypi package. type: string default: 1.0.3 steps: - run: name: Install dependencies command: | sudo apt-get install silversearcher-ag sudo pip install configcat-flag-reference-validator==<< parameters.validator-version >> execute-validation: description: Scans the repository for ConfigCat feature flag references. Displays the missing feature flag keys in CircleCI's build log. parameters: configcat-api-key: description: The api key of your ConfigCat project. default: CONFIG_CAT_API_KEY type: env_var_name scan-directory: description: The directory to scan for flag references. type: string default: . configcat-cdn-server: description: The domain name of the ConfigCat CDN where you ConfigCat configuration file is stored. type: string default: cdn.configcat.com fail-on-warnings: description: Signals a build error in CircleCI when the validation fails. By default only warnings are showed. type: boolean default: false debug: description: Turns on detailed logging. type: boolean default: false steps: - run: name: Scan for flag references command: | configcat-validator \ ${<< parameters.configcat-api-key >>} \ << parameters.scan-directory >> \ -s=<< parameters.configcat-cdn-server >> \ -v=<< parameters.debug >> \ -f=<< parameters.fail-on-warnings >> jobs: validate-flag-references: description: Scans the repository for ConfigCat feature flag references. Displays the missing feature flag keys in CircleCI's build log. parameters: configcat-api-key: description: The api key of your ConfigCat project. default: CONFIG_CAT_API_KEY type: env_var_name configcat-cdn-server: description: The domain name of the ConfigCat CDN where you ConfigCat configuration file is stored. type: string default: cdn.configcat.com fail-on-warnings: description: Signals a build error in CircleCI when the validation fails. By default only warnings are showed. type: boolean default: false debug: description: Turns on detailed logging. type: boolean default: false executor: name: default docker-image-version: 1.0.3 working_directory: /ref-validator steps: - checkout: path: /ref-validator/repo - execute-validation: configcat-api-key: << parameters.configcat-api-key >> configcat-cdn-server: << parameters.configcat-cdn-server >> fail-on-warnings: << parameters.fail-on-warnings >> debug: << parameters.debug >> scan-directory: ./repo
開発者向け最新情報
ビルド最適化のためのヒントを手に入れましょう。
または、リサーチパネルに参加して フィードバックをお寄せください。
このフォームを送信することで、当社の利用規約およびプライバシーポリシーに同意したものと見なされます。