Skip to content

Commit aaf57d7

Browse files
committed
add crdoc automation
1 parent ed62f65 commit aaf57d7

File tree

6 files changed

+14432
-5
lines changed

6 files changed

+14432
-5
lines changed

.github/workflows/release-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
cp -rf helm-charts "$RELEASE_DIR/"
258258
cp bundle.Dockerfile "$RELEASE_DIR/bundle.Dockerfile"
259259
cp licenses.csv "$RELEASE_DIR/"
260-
260+
cp docs/api-docs.md "$RELEASE_DIR/"
261261
262262
git fetch origin
263263
git checkout -f -b "$BRANCH" origin/main

.github/workflows/validate-manifests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
with:
1717
enable-cache: 'true'
1818
- name: Run testing
19-
run: devbox run -- 'make validate-manifests'
19+
run: devbox run -- 'make validate-manifests validate-api-docs'

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ ifneq ($(shell git ls-files -o -m --directory --exclude-standard --no-empty-dire
292292
$(info Detected files that need to be committed:)
293293
$(info $(shell git ls-files -o -m --directory --exclude-standard --no-empty-directory | sed -e "s/^/ /"))
294294
$(info )
295-
$(info Try running: make generate manifests)
295+
$(info Try running: make generate manifests api-docs)
296296
$(error Check: FAILED)
297297
else
298298
$(info Check: PASS)
@@ -644,8 +644,15 @@ tools/githubjobs/githubjobs: tools/githubjobs/*.go
644644
tools/scandeprecation/scandeprecation: tools/scandeprecation/*.go
645645
cd tools/scandeprecation && go test . && go build .
646646

647-
648647
.PHONY: slack-deprecations
649648
slack-deprecations: tools/scandeprecation/scandeprecation tools/githubjobs/githubjobs
650649
@echo "Computing and sending deprecation report to Slack..."
651-
GH_RUN_ID=$(GH_RUN_ID) ./tools/githubjobs/githubjobs | grep "javaMethod" | ./tools/scandeprecation/scandeprecations | ./scripts/slackit.sh $(SLACK_WEBHOOK)
650+
GH_RUN_ID=$(GH_RUN_ID) ./tools/githubjobs/githubjobs | grep "javaMethod" | ./tools/scandeprecation/scandeprecations | ./scripts/slackit.sh $(SLACK_WEBHOOK)
651+
652+
.PHONY: api-docs
653+
api-docs:
654+
go tool crdoc --resources config/crd/bases --output docs/api-docs.md
655+
656+
.PHONY: validate-api-docs
657+
validate-api-docs: api-docs
658+
$(MAKE) check-missing-files

0 commit comments

Comments
 (0)