Skip to content

Commit

Permalink
ci: fail job to lint grafana dashboards on error
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Aug 3, 2023
1 parent f9821df commit 63c6715
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 63c6715

Please sign in to comment.