Skip to content

Commit

Permalink
Add the kapitan-compile hook
Browse files Browse the repository at this point in the history
Adds a hook that compiles Kapitan templates in a repository
  • Loading branch information
muffix committed Feb 12, 2020
1 parent eea359f commit 687d625
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- id: kapitan-compile
name: Kapitan Compile
description: Compiles Kapitan templates in the repository
entry: hooks/kapitan-compile.sh
language: script
files: ^(components|templates|inventory|secrets).+\.ya?ml$
exclude: ^compiled
pass_filenames: false

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# pre-commit

A collection of pre-commit hooks for [https://github.com/pre-commit/pre-commit](https://github.com/pre-commit/pre-commit).

## Hooks

- **kapitan-compile**: Compiles [Kapitan](https://kapitan.dev) templates

6 changes: 6 additions & 0 deletions hooks/kapitan-compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e

docker run -t --rm -v $(pwd):/src:delegated deepmind/kapitan compile

0 comments on commit 687d625

Please sign in to comment.