provisioning: only update dashboard if hash of json changed

This commit is contained in:
bergquist
2018-05-31 14:13:34 +02:00
parent 44f5b92fbc
commit c817aecd66
7 changed files with 90 additions and 11 deletions

View File

@@ -1137,4 +1137,4 @@
"title": "Big Dashboard",
"uid": "000000003",
"version": 16
}
}

View File

@@ -5,10 +5,10 @@ bulkDashboard() {
requiresJsonnet
COUNTER=0
MAX=400
MAX=4
while [ $COUNTER -lt $MAX ]; do
jsonnet -o "dashboards/bulk-testing/dashboard${COUNTER}.json" -e "local bulkDash = import 'dashboards/bulk-testing/bulkdash.jsonnet'; bulkDash + { uid: 'uid-${COUNTER}', title: 'title-${COUNTER}' }"
let COUNTER=COUNTER+1
let COUNTER=COUNTER+1
done
ln -s -f -r ./dashboards/bulk-testing/bulk-dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
@@ -58,4 +58,4 @@ main() {
fi
}
main "$@"
main "$@"