-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kube-prometheus-stack] Add custom CI actions (#4065)
* [kube-prometheus-stack] Add custom CI actions Signed-off-by: Jan-Otto Kröpke <[email protected]> * Apply suggestions from code review Co-authored-by: Gabriel Martinez <[email protected]> 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]> Co-authored-by: Gabriel Martinez <[email protected]>
- Loading branch information
1 parent
92c39c7
commit ec52ff4
Showing
4 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
cd "${SCRIPT_DIR}/../" | ||
|
||
./hack/update_crds.sh | ||
if ! git diff --exit-code; then | ||
echo "Please run ./hack/update_crds.sh" | ||
exit 1 | ||
fi | ||
|
||
python3 -m venv venv | ||
source venv/bin/activate | ||
pip3 install -r hack/requirements.txt | ||
|
||
go install -a github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest | ||
export PATH="$(go env GOPATH)/bin:$PATH" | ||
|
||
./hack/sync_prometheus_rules.py | ||
if ! git diff --exit-code; then | ||
echo "Changes inside rules are not supported!" | ||
echo "Please run ./hack/sync_prometheus_rules.py" | ||
exit 1 | ||
fi | ||
|
||
./hack/sync_grafana_dashboards.py | ||
if ! git diff --exit-code; then | ||
echo "Changes inside dashboards are not supported!" | ||
echo "Please run ./hack/sync_grafana_dashboards.py" | ||
exit 1 | ||
fi | ||
|
||
rm -rf ./venv ./*.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
PyYAML==5.4 | ||
PyYAML==6.0.1 | ||
requests==2.31.0 | ||
jsonnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters