File tree Expand file tree Collapse file tree 4 files changed +68
-36
lines changed
Expand file tree Collapse file tree 4 files changed +68
-36
lines changed Original file line number Diff line number Diff line change 2424 az bicep install -v v0.33.93
2525 az bicep version
2626 make fmt
27- make modules/metrics/rules/generatedPrometheusAlertingRules.bicep
2827 make lint
2928 - name : Check for uncommitted changes
3029 working-directory : ' ./dev-infrastructure'
Original file line number Diff line number Diff line change 1+ name : ' ci-observability'
2+ on :
3+ pull_request :
4+ branches :
5+ - main
6+ paths :
7+ - ' .github/workflows/ci-python.yml'
8+ - ' observability/**'
9+ types :
10+ - opened
11+ - synchronize
12+ - reopened
13+ - closed
14+ jobs :
15+ test-grafana-script :
16+ runs-on : ' ubuntu-latest'
17+ steps :
18+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+ with :
20+ fetch-depth : 1
21+ - uses : actions/setup-python@v5
22+ with :
23+ python-version : ' 3.9'
24+ - run : cd observability/grafana && make test
25+ - run : |
26+ cd observability/grafana &&
27+ pip install black &&
28+ make format
29+ - run : |
30+ if [[ ! -z "$(git status --short)" ]]
31+ then
32+ echo "there are some modified files, rerun 'make format' to update them and check the changes in"
33+ git status
34+ exit 1
35+ fi
36+ test-prometheus-rules :
37+ runs-on : ' ubuntu-latest'
38+ steps :
39+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40+ with :
41+ fetch-depth : 1
42+ - name : ' Set up Go'
43+ uses : actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
44+ with :
45+ go-version-file : ' go.work'
46+ check-latest : true
47+ - name : ' Install promtool'
48+ run : |
49+ cd $(mktemp -d)
50+ curl -sfLo - https://github.com/prometheus/prometheus/releases/download/v3.2.1/prometheus-3.2.1.linux-amd64.tar.gz | tar xzf -
51+ sudo mv prometheus-3.2.1.linux-amd64/promtool /usr/local/bin/promtool
52+ chmod +x /usr/local/bin/promtool
53+ - name : ' Make alerts'
54+ run : |
55+ # https://github.com/actions/runner-images/issues/11987
56+ az config set bicep.use_binary_from_path=false
57+ az bicep install
58+ cd observability &&
59+ make alerts
60+ - name : ' Ensure all changes are persisted'
61+ run : |-
62+ if [[ ! -z "$(git status --short)" ]]
63+ then
64+ echo "there are some modified files, rerun 'make alerts' to update them and check the changes in"
65+ git status
66+ exit 1
67+ fi
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ kubernetesControlPlane-prometheusRule:
88alerts : kubernetesControlPlane-prometheusRule
99 make -C ../tooling/prometheus-rules run
1010 az bicep format -f $$(yq '.prometheusRules.outputBicep' observability.yaml )
11+ .PHONY : alerts
You can’t perform that action at this time.
0 commit comments