kube-thanos/build.sh
Matthias Loibl 241486d23a
Generate all components to examples/all
This example is mostly for quality ensurance of all components together
2019-07-11 15:45:00 +02:00

23 lines
754 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 start with a clean 'manifests' dir
rm -rf manifests
mkdir manifests
# 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 {}' -- {}
# The following script generates all components, mostly used for testing
rm -rf examples/all/manifests
mkdir examples/all/manifests
jsonnet -J vendor -m examples/all/manifests "${1-all.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {}