Skip to content

Commit 5fecf36

Browse files
committed
Add README.md
0 parents  commit 5fecf36

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# JOSA Pre-commit Hooks
2+
3+
This repository contains JOSA's custom pre-commit hooks.
4+
5+
___
6+
7+
## Using pre-commit-hooks with pre-commit
8+
9+
Add this to your .pre-commit-config.yaml:
10+
11+
```yaml
12+
- repo: https://github.com/jordanopensource/pre-commit-hooks
13+
rev: v0.1.0 # Use the ref you want to point at
14+
hooks:
15+
- id: validate-flux
16+
# - id: ...
17+
```
18+
19+
## Available Hooks
20+
21+
- [Validate Flux](#validate-flux) - A script to validate Flux custom resources and Kustomize overlays.
22+
23+
___
24+
25+
## validate-flux
26+
27+
This script downloads the Flux OpenAPI schemas, then it validates the
28+
Flux custom resources and the `kustomize` overlays using `kubeconform`.
29+
This script is meant to be run locally and in CI before the changes.
30+
31+
### Prerequisites
32+
33+
You need the following to be installed on your machine before running this pre-commit script.
34+
35+
- [yq v4.6](https://github.com/mikefarah/yq)
36+
- [kustomize v4.1](https://github.com/kubernetes-sigs/kustomize)
37+
- [kubeconform v0.4.12](https://github.com/yannh/kubeconform)

0 commit comments

Comments
 (0)