Skip to content

Commit

Permalink
Merge pull request #4 from Smirl/support-kapitan-image-env
Browse files Browse the repository at this point in the history
  • Loading branch information
muffix committed Mar 29, 2021
2 parents 84bd521 + 1cc689b commit ba45087
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ A collection of pre-commit hooks for [https://github.com/pre-commit/pre-commit](

## Hooks

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

Compiles [Kapitan](https://kapitan.dev) templates. Supports the `KAPITAN_IMAGE`
environment variable which should be the docker image to use. Defaults to:
`deepmind/kapitan:v0.29.5`.

## Development dependencies

Expand Down
6 changes: 4 additions & 2 deletions hooks/kapitan-compile.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh

set -eu
set -eux

KAPITAN_IMAGE="${KAPITAN_IMAGE:-deepmind/kapitan:v0.29.5}"

# shellcheck disable=SC2068
docker run -t --rm -v "${PWD}":/src:delegated deepmind/kapitan:0.27.2 compile $@
docker run -t --rm -v "${PWD}":/src:delegated "${KAPITAN_IMAGE}" compile "$@"

0 comments on commit ba45087

Please sign in to comment.