Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/prometheus-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ on:
- main
paths:
- observability/prometheus/rules/**/*.y*ml

env:
GO_VERSION: 1.19.1

jobs:
rules:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v2
- name: Create Prometheus rule file
run: |
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
make install-tools
cd observability/prometheus/
echo "# This file got auto-generated by GitHub workflow '$GITHUB_WORKFLOW'" > rule-file.yml
Expand All @@ -31,8 +37,6 @@ jobs:
yq eval-all --inplace --no-colors --prettyPrint "$append_rabbitmq_rules" rule-file.yml rules/rabbitmq/recording-rules.yml
- name: Check Prometheus rule file
run: |
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
# need to use @main because of https://github.com/prometheus/prometheus/issues/8586#issuecomment-796976710
GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool@main
promtool check rules observability/prometheus/rule-file.yml
Expand Down