Skip to content

Commit 4855c2c

Browse files
authored
Add simple CI usage documentation (#970)
1 parent fc077ea commit 4855c2c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/using-kubelinter.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,25 @@ includes the following pre-commit hooks:
6060
- You must [install Docker](https://docs.docker.com/engine/install/) before
6161
running this pre-commit hook.
6262

63+
## Using KubeLinter as part of your CI pipeline
64+
65+
If you're using GitHub, there's the [KubeLinter GitHub Action](README.md#kubelinter-github-action) available.
66+
67+
Alternatively, you can grab the latest binary release with the following commands
68+
```bash
69+
LOCATION=$(curl -s https://api.github.com/repos/stackrox/kube-linter/releases/latest \
70+
| jq -r '.tag_name
71+
| "https://github.com/stackrox/kube-linter/releases/download/\(.)/kube-linter-linux.tar.gz"')
72+
curl -L -o kube-linter-linux.tar.gz $LOCATION
73+
mkdir kube-linter/
74+
tar -xf kube-linter-linux.tar.gz -C "kube-linter/"
75+
76+
```
77+
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:
78+
```bash
79+
./kube-linter/kube-linter lint --fail-on-invalid-resource /path/to/yaml-file.yaml
80+
```
81+
6382
## KubeLinter commands
6483

6584
This section covers kube-linter command syntax, describes the command

0 commit comments

Comments
 (0)