-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add exceptions to GitHub output (#818)
Signed-off-by: shayyxi <shazi12384@gmail.com> Co-authored-by: shayyxi <shazi12384@gmail.com>
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
# Examples | ||
|
||
This folder contains examples of how to use Conftest. | ||
|
||
## How to test a manifest against a specific policy in the examples folder | ||
|
||
There are various policies with the manifests in the examples folder. They can be tested in a following way: | ||
|
||
Run the following command to build the local binary: | ||
```console | ||
make build | ||
``` | ||
|
||
Then, run the following command to test the specific manifest against a specific policy: | ||
```console | ||
./conftest test -p examples/exceptions/policy/ examples/exceptions/deployments.yaml | ||
``` | ||
|
||
In the above command, we are testing the manifest `examples/exceptions/deployments.yaml` against the policy `examples/exceptions/policy/`. | ||
|
||
The `./conftest test` command supports various flags as well for different output formats and configurations. The list of | ||
supported flags can be displayed with the following command: | ||
|
||
```console | ||
./conftest test --help | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters