ci: cleanup makefile, share build.sh with storage

This commit is contained in:
Stefan Reimer 2022-04-20 11:12:01 +02:00
parent f334d07897
commit 7422bf23fc
4 changed files with 9 additions and 15 deletions

View File

@ -16,9 +16,10 @@ fmt:
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNET_FMT) -i
generate: build.sh
generate: clean build.sh
bash build.sh $<
jsonnet -J vendor -m dashboards -e '(import "dashboards.libsonnet").grafanaDashboards'
jsonnet -J vendor -m rules rules.libsonnet
lint:
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
while read f; do \

View File

@ -12,9 +12,3 @@ else
#jb install github.com/prometheus-operator/kube-prometheus/jsonnet/kube-prometheus@main
jb install github.com/prometheus-operator/kube-prometheus/jsonnet/kube-prometheus@release-0.10
fi
make clean
jsonnet -J vendor -m dashboards -e '(import "dashboards.libsonnet").grafanaDashboards'
#jsonnet -J vendor -m rules rules.libsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {}
jsonnet -J vendor -m rules rules.libsonnet

View File

@ -18,7 +18,7 @@
"subdir": "contrib/mixin"
}
},
"version": "3ace62279270ef83c48496ba1a01fb38abe7f76a",
"version": "b872757492ca70f350abd44eb95d81b95339f581",
"sum": "W/Azptf1PoqjyMwJON96UY69MFugDA4IAYiKURscryc="
},
{
@ -38,7 +38,7 @@
"subdir": "grafana-builder"
}
},
"version": "318a65120918fe8e298ffc8e63b9e941677ef321",
"version": "5fb2525651cc6e5100e081b10ad9fbe7e3595231",
"sum": "0KkygBQd/AFzUvVzezE4qF/uDYgrwUXVpZfINBti0oc="
},
{
@ -58,7 +58,7 @@
"subdir": "lib/promgrafonnet"
}
},
"version": "f2b5aab16039e7aa78c1b39aad1ec63d87eca85e",
"version": "62ad10fe9ceb53c6b846871997abbfe8e0bd7cf5",
"sum": "zv7hXGui6BfHzE9wPatHI/AGZa4A2WKo6pq7ZdqBsps="
},
{
@ -88,8 +88,8 @@
"subdir": "jsonnet/kube-prometheus"
}
},
"version": "c8db3c85db6e13b94726b7c5d630a6ebe7038cf9",
"sum": "7DfVEg2kDzIQPgxTThnjQ4S2ZksrF0hkNLysXP6Wv24="
"version": "452aaed72e36acb31cae93cfa85a5d9c3d3d2ec7",
"sum": "pupXEvlRbhLdEO9b8LfFZB66+Z7fEqvRZ9m3MyEvsv4="
},
{
"source": {

View File

@ -16,8 +16,7 @@ patch -p0 -i zdt.patch --no-backup-if-mismatch
patch -p0 -i zdt-pushgateway.patch --no-backup-if-mismatch
# Create ZDT dashboard, alerts etc configmaps
cd jsonnet
./build.sh
cd jsonnet && make
../sync_grafana_dashboards.py metrics-dashboards.yaml ../templates/grafana-dashboards-metrics.yaml
../sync_grafana_dashboards.py k8s-dashboards.yaml ../templates/grafana-dashboards-k8s.yaml