Skip to content

Commit

Permalink
.github/workflows: install promtool from binary release
Browse files Browse the repository at this point in the history
`go get` no longer works to install binaries with Go 1.18 and `go install`
unfortunately doesn't work due to
prometheus/prometheus#8852 and related issues.

Thus install promtool from the Prometheos binary release. While at it
bump the version to v2.34.0.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
  • Loading branch information
tklauser committed Mar 18, 2022
1 parent c4fb95e commit eb20a96
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/tests-smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
CONFORMANCE_TEMPLATE: examples/kubernetes/connectivity-check/connectivity-check.yaml
TIMEOUT: 2m
LOG_TIME: 30m
PROM_VERSION: 2.34.0

jobs:
check_changes:
Expand Down Expand Up @@ -187,8 +188,11 @@ jobs:
cilium_pod=$(kubectl -n kube-system get po -o name --field-selector=status.phase==Running -l 'k8s-app=cilium' -o jsonpath='{.items[0].metadata.name}' )
kubectl -n kube-system exec $cilium_pod -- sh -c "apt update && apt install curl -y"
kubectl -n kube-system exec $cilium_pod -- curl http://localhost:9090/metrics > metrics.prom
go install github.com/prometheus/prometheus/cmd/promtool@v2.31.1
cat metrics.prom | $HOME/go/bin/promtool check metrics
curl -sSLO https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz
tar xzvf prometheus-${PROM_VERSION}.linux-amd64.tar.gz prometheus-${PROM_VERSION}.linux-amd64/promtool
rm -f prometheus-${PROM_VERSION}.linux-amd64.tar.gz
sudo mv prometheus-${PROM_VERSION}.linux-amd64/promtool /usr/bin
cat metrics.prom | promtool check metrics
- name: Capture cilium-sysdump
if: ${{ failure() }}
Expand Down

0 comments on commit eb20a96

Please sign in to comment.