Skip to content

Commit

Permalink
chore: add test catalog codegen (#801)
Browse files Browse the repository at this point in the history
* chore: add test catalog codegen

Signed-off-by: Charles-Edouard Brétéché <[email protected]>

* codegen

Signed-off-by: Charles-Edouard Brétéché <[email protected]>

---------

Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Feb 5, 2024
1 parent 984cd08 commit 7b4af0d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .release-notes/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ Release notes for `TODO`.

- Added kubebuilder community recording link where chainsaw was presented
- Added a `MAINTAINERS.md` file
- Added CI to check PR semantics
- Added CI job to check PR semantics
- Added CI job to check test catalog
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ codegen-schemas-openapi: codegen-crds $(KIND) ## Generate openapi schemas (v2 an

.PHONY: codegen-schemas-json
codegen-schemas-json: codegen-schemas-openapi ## Generate json schemas
@echo Generate json schema... >&2
@$(PIP) install openapi2jsonschema --no-build-isolation
@rm -rf ./.temp/.schemas/json
@rm -rf ./.schemas/json
Expand All @@ -150,8 +151,21 @@ codegen-schemas-json: codegen-schemas-openapi ## Generate json schemas
@rm -rf pkg/data/schemas/json && mkdir -p pkg/data/schemas/json
@cp ./.schemas/json/* pkg/data/schemas/json

.PHONY: codegen-tests-catalog
codegen-tests-catalog: $(CLI_BIN) ## Generate tests catalog files
@echo Generate tests catalog... >&2
@./$(CLI_BIN) build docs --test-dir ./testdata/e2e --catalog ./testdata/e2e/examples/CATALOG.md

.PHONY: codegen
codegen: codegen-crds codegen-deepcopy codegen-register codegen-mkdocs codegen-cli-docs codegen-api-docs codegen-schemas-json ## Rebuild all generated code and docs
codegen: ## Rebuild all generated code and docs
codegen: codegen-api-docs
codegen: codegen-cli-docs
codegen: codegen-crds
codegen: codegen-deepcopy
codegen: codegen-mkdocs
codegen: codegen-register
codegen: codegen-schemas-json
codegen: codegen-tests-catalog

.PHONY: verify-codegen
verify-codegen: codegen ## Verify all generated code and docs are up to date
Expand Down
2 changes: 1 addition & 1 deletion testdata/e2e/examples/CATALOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [assertion-tree](assertion-tree/README.md)
- [basic](basic/README.md)
- [catch](catch/README.md)
- [test](command-output/README.md)
- [command-output](command-output/README.md)
- [delete](delete/README.md)
- [finally](finally/README.md)
- [inline](inline/README.md)
Expand Down
2 changes: 1 addition & 1 deletion testdata/e2e/examples/command-output/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Test: `test`
# Test: `command-output`

*No description*

Expand Down
2 changes: 1 addition & 1 deletion testdata/e2e/examples/command-output/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: test
name: command-output
spec:
steps:
- name: Check bad kubectl command
Expand Down

0 comments on commit 7b4af0d

Please sign in to comment.