ci: rework docs-related workflow and make targets a bit

This change continues an effort started earlier to make some
make targets and ci workflows more consistent and systematic.
see https://github.com/rook/rook/pull/14922

it adds a  make target gen.helm-docs as an alias to helm-docs.
Additionally, gen.docs is added as alias to docs.
targets check.docs and check.helm-docs are removed because it was agreed
that targets using git are of little value to developers.
Their functionality is moved back into the corresponding docs workflow.

xiFinally, the  redundant "Check helm-docs" check is removed from the
docs-check workflow

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Michael Adam committed 2025-01-09 20:31:14 +01:00
1 parent 03a7a1544c
commit 795e188024
3 files changed
+10 -16

No files matched your search

+3 -3
View File
@@ -42,10 +42,10 @@ jobs:
Documentation/**/*.md
!Documentation/Helm-Charts
- name: Check helm-docs
run: make check.helm-docs
- name: Check docs
run: make check.docs
run: |
make gen.docs
tests/scripts/validate_modified_files.sh docs
- name: Install mkdocs and dependencies
run: cd build/release/ && make deps.docs
+2 -12
View File
@@ -194,6 +194,7 @@ gen-rbac: $(HELM) $(YQ) ## Generate RBAC from Helm charts
gen.docs: docs
docs: helm-docs
gen.helm-docs: helm-docs
helm-docs: $(HELM_DOCS) ## Use helm-docs to generate documentation from helm charts
$(HELM_DOCS) -c deploy/charts/rook-ceph \
-o ../../../Documentation/Helm-Charts/operator-chart.md \
@@ -204,17 +205,6 @@ helm-docs: $(HELM_DOCS) ## Use helm-docs to generate documentation from helm cha
-t ../../../Documentation/Helm-Charts/ceph-cluster-chart.gotmpl.md \
-t ../../../Documentation/Helm-Charts/_templates.gotmpl
check.helm-docs:
@$(MAKE) helm-docs
@git diff --exit-code || { \
echo "Please run 'make helm-docs' locally, commit the updated docs, and push the change. See https://rook.io/docs/rook/latest/Contributing/documentation/#making-docs" ; \
exit 2 ; \
};
check.docs:
@$(MAKE) docs
@tests/scripts/validate_modified_files.sh docs
docs-preview: ## Preview the documentation through mkdocs
mkdocs serve
@@ -229,7 +219,7 @@ generate: gen.codegen gen.crds gen.rbac gen.docs gen.crd-docs ## Update all gene
.PHONY: all build.common
.PHONY: build build.all install test check vet fmt codegen gen.codegen gen.rbac gen.crds gen.crd-docs gen.docs generate mod.check clean distclean prune
.PHONY: build build.all install test check vet fmt codegen gen.codegen gen.rbac gen.crds gen.crd-docs gen.docs gen.helm-docs generate mod.check clean distclean prune
# ====================================================================================
# Help
+5 -1
View File
@@ -10,6 +10,7 @@ CRD_ERR="changes found by 'make crds'. please run 'make crds' locally and update
BUILD_ERR="changes found by make build', please commit your go.sum or other changed files"
HELM_ERR="changes found by 'make gen-rbac'. please run 'make gen-rbac' locally and update your PR"
DOCS_ERR="changes found by 'make docs'. please run 'make docs' locally and update your PR"
HELM_DOCS_ERR="changes found by 'make helm-docs'. please run 'make helm-docs' locally and update your PR"
#############
# FUNCTIONS #
@@ -33,6 +34,9 @@ case "$1" in
docs)
validate "$DOCS_ERR"
;;
helm-docs)
validate "$HELM_DOCS_ERR"
;;
codegen)
validate "$CODEGEN_ERR"
;;
@@ -49,6 +53,6 @@ case "$1" in
validate "$HELM_ERR"
;;
*)
echo $"Usage: $0 {docs|codegen|modcheck|crd|build|gen-rbac}"
echo $"Usage: $0 {docs|helm-docs|codegen|modcheck|crd|build|gen-rbac}"
exit 1
esac