Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: add check to verify runbook urls #1246

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile
Expand Up @@ -85,7 +85,7 @@ vendor:
go mod verify

.PHONY: generate
generate: build-jsonnet docs check-assets
generate: build-jsonnet docs check-assets check-runbooks

.PHONY: generate-in-docker
generate-in-docker:
Expand Down Expand Up @@ -156,6 +156,12 @@ test-rules: check-rules
check-assets:
hack/check-assets.sh

.PHONY: check-runbooks
check-runbooks:
# Get runbook urls from the alerts annotations and test if a link is broken
# with wget. It also make sure that the command succeed when there are no urls.
@grep -rho 'runbook_url.*' assets || true | cut -f2- -d: | wget --spider -nv -i -

###########
# Testing #
###########
Expand Down