kube-prometheus/build.sh
Damien Grisonnet 9a7ba10755 build.sh: update PATH to use project tooling
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-04-06 18:15:34 +02:00

20 lines
610 B
Bash
Executable File

#!/usr/bin/env bash
# This script uses arg $1 (name of *.jsonnet file to use) to generate the manifests/*.yaml files.
set -e
set -x
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
# Make sure to use project tooling
PATH="$(pwd)/tmp/bin:${PATH}"
# Make sure to start with a clean 'manifests' dir
rm -rf manifests
mkdir -p manifests/setup
# optional, but we would like to generate yaml, not json
jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {}