Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Jan 15, 2025
1 parent 6844d4f commit dd5fbcb
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions charts/kube-prometheus-stack/ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@ set -euo pipefail

cd "${SCRIPT_DIR}/../"

./hack/update_crds.sh
if ! git diff "$GITHUB_SHA" --color=always --exit-code -- ':!*.tar.xz'; then
echo "Please run ./hack/update_crds.sh"
exit 1
fi

## CHECK crds.tar.xz content FIRST ##
cd "${SCRIPT_DIR}/../charts/crds/crds/"

rm ./*.yaml

tar xJf "${SCRIPT_DIR}/../charts/crds/files/crds.tar.xz"

if ! git diff "$GITHUB_SHA" --color=always --exit-code -- ':!*.tar.xz'; then
cd "${SCRIPT_DIR}/../"

if ! git diff "$GITHUB_SHA" --color=always --exit-code; then
echo "Suspicious crds.tar.xz. Please run ./hack/update_crds.sh"
exit 1
fi

cd "${SCRIPT_DIR}/../"
## CHECK if CRDs are up2date ##
./hack/update_crds.sh
if ! git diff "$GITHUB_SHA" --color=always --exit-code -- ':(exclude)*.tar.xz'; then
echo "Please run ./hack/update_crds.sh"
exit 1
fi


cd hack

Expand All @@ -41,14 +44,14 @@ set -euo pipefail
export PATH

./sync_prometheus_rules.py
if ! git diff "$GITHUB_SHA" --color=always --exit-code; then
if ! git diff "$GITHUB_SHA" --color=always --exit-code -- ':(exclude)*.tar.xz'; then
echo "Changes inside rules are not supported!"
echo "Please go into the ./hack/ directory and run ./sync_prometheus_rules.py"
exit 1
fi

./sync_grafana_dashboards.py
if ! git diff "$GITHUB_SHA" --color=always --exit-code; then
if ! git diff "$GITHUB_SHA" --color=always --exit-code -- ':(exclude)*.tar.xz'; then
echo "Changes inside dashboards are not supported!"
echo "Please go into the ./hack/ directory and run ./sync_grafana_dashboards.py"
exit 1
Expand Down

0 comments on commit dd5fbcb

Please sign in to comment.