Skip to content

Add simple CI usage documentation #970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/using-kubelinter.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,25 @@ includes the following pre-commit hooks:
- You must [install Docker](https://docs.docker.com/engine/install/) before
running this pre-commit hook.

## Using KubeLinter as part of your CI pipeline

If you're using GitHub, there's the [KubeLinter GitHub Action](README.md#kubelinter-github-action) available.

Alternatively, you can grab the latest binary release with the following commands
```bash
LOCATION=$(curl -s https://api.github.com/repos/stackrox/kube-linter/releases/latest \
| jq -r '.tag_name
| "https://github.com/stackrox/kube-linter/releases/download/\(.)/kube-linter-linux.tar.gz"')
curl -L -o kube-linter-linux.tar.gz $LOCATION
mkdir kube-linter/
tar -xf kube-linter-linux.tar.gz -C "kube-linter/"

```
and pass `--fail-on-invalid-resource` as an option to have your pipeline fail if your YAML file can't be parsed. See the following example:
```bash
./kube-linter/kube-linter lint --fail-on-invalid-resource /path/to/yaml-file.yaml
```

## KubeLinter commands

This section covers kube-linter command syntax, describes the command
Expand Down
Loading