diff --git a/README.md b/README.md index 5123b3e..4facabf 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/hooks/kapitan-compile.sh b/hooks/kapitan-compile.sh index 603667a..853fd5f 100755 --- a/hooks/kapitan-compile.sh +++ b/hooks/kapitan-compile.sh @@ -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 "$@"