Skip to content

Commit

Permalink
ci: fail job to lint grafana dashboards on error (#5841)
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Aug 3, 2023
1 parent 8a57890 commit 5739caf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/validate-grafana-dashboards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# This script will mutate the dashboards if anything needs linting
node scripts/lint-grafana-dashboards.mjs ./dashboards

if [[ $? -ne 0 ]]; then
echo 'linting dashboards failed'
exit 1
fi

if [[ $(git diff --stat ./dashboards) != '' ]]; then
git --no-pager diff
echo 'dashboards need fixing'
Expand Down

0 comments on commit 5739caf

Please sign in to comment.