1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix: verification of cli docs breaks CI (for real) (#8193)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-08-31 17:17:26 +02:00 committed by GitHub
parent f3ad487bf7
commit d1c8e7be93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 8 additions and 23 deletions

View file

@ -516,7 +516,7 @@ codegen-api-docs: $(PACKAGE_SHIM) $(GEN_CRD_API_REFERENCE_DOCS) ## Generate API
codegen-cli-docs: $(CLI_BIN) ## Generate CLI docs
@echo Generate cli docs... >&2
@rm -rf docs/user/cli && mkdir -p docs/user/cli
@$(CLI_BIN) docs -o docs/user/cli
@$(CLI_BIN) docs -o docs/user/cli --autogenTag=false
.PHONY: codegen-docs-all
codegen-docs-all: codegen-helm-docs codegen-cli-docs codegen-api-docs ## Generate all docs
@ -626,12 +626,12 @@ verify-deepcopy: codegen-deepcopy ## Check deepcopy functions are up to date
@git diff --quiet --exit-code api
.PHONY: verify-docs
verify-docs: # codegen-docs-all ## Check docs are up to date
verify-docs: codegen-docs-all ## Check docs are up to date
@echo Checking docs are up to date... >&2
@git --no-pager diff docs/user/crd
@git --no-pager diff docs/user
@echo 'If this test fails, it is because the git diff is non-empty after running "make codegen-docs-all".' >&2
@echo 'To correct this, locally run "make codegen-docs-all", commit the changes, and re-run tests.' >&2
@git diff --quiet --exit-code docs/user/crd
@git diff --quiet --exit-code docs/user
.PHONY: verify-helm
verify-helm: codegen-helm-all ## Check Helm charts are up to date

View file

@ -43,6 +43,7 @@ func empty(s string) string {
func Command(root *cobra.Command) *cobra.Command {
var path string
var website bool
var autogenTag bool
cmd := &cobra.Command{
Use: "docs",
Short: "Generates documentation.",
@ -59,11 +60,13 @@ func Command(root *cobra.Command) *cobra.Command {
return err
}
}
root.DisableAutoGenTag = !autogenTag
return doc.GenMarkdownTreeCustom(root, path, prepender, linkHandler)
},
}
cmd.Flags().StringVarP(&path, "output", "o", ".", "Output path")
cmd.Flags().BoolVar(&website, "website", false, "Website version")
cmd.Flags().BoolVar(&autogenTag, "autogenTag", true, "Determines if the generated docs should contain a timestamp")
if err := cmd.MarkFlagDirname("output"); err != nil {
log.Println("WARNING", err)
}

View file

@ -35,4 +35,3 @@ To enable experimental commands, KYVERNO_EXPERIMENTAL should be configured with
* [kyverno test](kyverno_test.md) - Run tests from directory.
* [kyverno version](kyverno_version.md) - Shows current version of kyverno.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -136,4 +136,3 @@ More info: https://kyverno.io/docs/kyverno-cli/
* [kyverno](kyverno.md) - Kubernetes Native Policy Management
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -40,4 +40,3 @@ See each sub-command's help for details on how to use the generated script.
* [kyverno completion powershell](kyverno_completion_powershell.md) - Generate the autocompletion script for powershell
* [kyverno completion zsh](kyverno_completion_zsh.md) - Generate the autocompletion script for zsh
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -59,4 +59,3 @@ kyverno completion bash
* [kyverno completion](kyverno_completion.md) - Generate the autocompletion script for the specified shell
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -50,4 +50,3 @@ kyverno completion fish [flags]
* [kyverno completion](kyverno_completion.md) - Generate the autocompletion script for the specified shell
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -47,4 +47,3 @@ kyverno completion powershell [flags]
* [kyverno completion](kyverno_completion.md) - Generate the autocompletion script for the specified shell
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -61,4 +61,3 @@ kyverno completion zsh [flags]
* [kyverno completion](kyverno_completion.md) - Generate the autocompletion script for the specified shell
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -38,4 +38,3 @@ kyverno create [flags]
* [kyverno create user-info](kyverno_create_user-info.md) - Create a Kyverno user-info file.
* [kyverno create values](kyverno_create_values.md) - Create a Kyverno values file.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -45,4 +45,3 @@ kyverno create metrics-config -i ns-included-1 -i ns-included-2 -e ns-excluded
* [kyverno create](kyverno_create.md) - Provides a command-line interface to help with the creation of various Kyverno resources.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -48,4 +48,3 @@ kyverno create test -p policy.yaml -r resource.yaml -f values.yaml --pass policy
* [kyverno create](kyverno_create.md) - Provides a command-line interface to help with the creation of various Kyverno resources.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -45,4 +45,3 @@ kyverno create user-info -u molybdenum@somecorp.com -g basic-user -c admin
* [kyverno create](kyverno_create.md) - Provides a command-line interface to help with the creation of various Kyverno resources.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -45,4 +45,3 @@ kyverno create values -g request.mode=dev -n prod,env=prod --rule policy,rule,en
* [kyverno create](kyverno_create.md) - Provides a command-line interface to help with the creation of various Kyverno resources.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -9,6 +9,7 @@ kyverno docs [flags]
### Options
```
--autogenTag Determines if the generated docs should contain a timestamp (default true)
-h, --help help for docs
-o, --output string Output path (default ".")
--website Website version
@ -36,4 +37,3 @@ kyverno docs [flags]
* [kyverno](kyverno.md) - Kubernetes Native Policy Management
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -42,4 +42,3 @@ kyverno jp [flags]
* [kyverno jp parse](kyverno_jp_parse.md) - Parses jmespath expression and shows corresponding AST
* [kyverno jp query](kyverno_jp_query.md) - Provides a command-line interface to JMESPath, enhanced with Kyverno specific custom functions
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -49,4 +49,3 @@ kyverno jp function [function_name]... [flags]
* [kyverno jp](kyverno_jp.md) - Provides a command-line interface to JMESPath, enhanced with Kyverno specific custom functions.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -59,4 +59,3 @@ kyverno jp parse [-f file|expression]... [flags]
* [kyverno jp](kyverno_jp.md) - Provides a command-line interface to JMESPath, enhanced with Kyverno specific custom functions.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -62,4 +62,3 @@ kyverno jp query [-i input] [-q query|query]... [flags]
* [kyverno jp](kyverno_jp.md) - Provides a command-line interface to JMESPath, enhanced with Kyverno specific custom functions.
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -173,4 +173,3 @@ For more information visit https://kyverno.io/docs/kyverno-cli/#test
* [kyverno](kyverno.md) - Kubernetes Native Policy Management
###### Auto generated by spf13/cobra on 30-Aug-2023

View file

@ -34,4 +34,3 @@ kyverno version [flags]
* [kyverno](kyverno.md) - Kubernetes Native Policy Management
###### Auto generated by spf13/cobra on 30-Aug-2023