File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 )
You can’t perform that action at this time.
0 commit comments