> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# kenfdev/conftest-orb

Easily integrate Conftest View this orb's source: https://github.com/kenfdev/conftest-orb


## Commands

### install

Install conftest

| Parameter | Type | Default | Description |
|---|---|---|---|
| `version` | string | latest | The version of conftest to install |

### pull

Download individual policies from an OCI registry.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `policy_path` | string | policy | Path to the Rego policy files directory. For the test command, specifying a specific .rego file is allowed. |
| `repository` | string |  | Repository to pull policies from. |

### push

Upload individual policies to an OCI registry

| Parameter | Type | Default | Description |
|---|---|---|---|
| `path` | string | . | Path to create the bundle from. |
| `repository` | string |  | Repository to push policies to. |

### test

Test your configuration files using conftest

| Parameter | Type | Default | Description |
|---|---|---|---|
| `fail_on_warn` | boolean | false | Return a non-zero exit code when warnings are found. |
| `file` | string |  | File(s) to test against. |
| `input_type` | string |  | Input type for given source, especially useful when using conftest with stdin.(valid options are toml, tf, hcl, cue, ini, yaml, json) |
| `namespace` | string | main | Namespace in which to find deny and warn rules. |
| `output_type` | enum | stdout | Output format for conftest results.(valid options are stdout, json, tap) |
| `policy_path` | string | policy | Path to the Rego policy files directory. For the test command, specifying a specific .rego file is allowed. |

### verify

Verify Rego unit tests

| Parameter | Type | Default | Description |
|---|---|---|---|
| `namespace` | string | main | Namespace in which to find deny and warn rules. |
| `output_type` | enum | stdout | Output format for conftest results.(valid options are stdout, json, tap) |
| `policy_path` | string | policy | Path to the Rego policy files directory. For the test command, specifying a specific .rego file is allowed. |

## Jobs

### test

Run conftest test

| Parameter | Type | Default | Description |
|---|---|---|---|
| `fail_on_warn` | boolean | false | Return a non-zero exit code when warnings are found. |
| `file` | string |  | File(s) to test against. |
| `policy_path` | string | policy | Path to the Rego policy files directory. |
| `repository` | string |  | Repository to pull policies from. If specified, will pull policies to the `policy_path` before executing the test. |
| `version` | string | latest | Version of conftest to use. |

## Executors

### default

Docker image with only the minimal tools needed to run a build. Based on Docker Alpine


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | latest | The tag of the docker image. See the following for the full list. https://hub.docker.com/r/cibuilds/base/tags
 |

## Examples

### simple

Runs conftest tests against the target file.


```yaml
orbs:
  conftest: kenfdev/conftest-orb@x.y
version: 2.1
workflows:
  build:
    jobs:
      - conftest/test:
          file: config_to_test.yaml
          pre-steps:
            - checkout
```