diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6ae40730b..fee3f9fcb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v2 - name: Lint - run: ./scripts/kyaml-pre-commit.sh + run: ./hack/kyaml-pre-commit.sh env: KUSTOMIZE_DOCKER_E2E: false # don't need to do e2e tests for linting diff --git a/Makefile b/Makefile index 2f67e5da2..ec23d2318 100644 --- a/Makefile +++ b/Makefile @@ -241,10 +241,10 @@ test-unit-kustomize-all: \ test-unit-kustomize-plugins test-unit-cmd-all: - ./scripts/kyaml-pre-commit.sh + ./hack/kyaml-pre-commit.sh test-go-mod: - ./scripts/check-go-mod.sh + ./hack/check-go-mod.sh # Environment variables are defined at # https://github.com/kubernetes/test-infra/blob/master/prow/jobs.md#job-environment-variables @@ -256,7 +256,7 @@ test-multi-module: $(MYGOBIN)/prchecker export REPO_NAME=$(REPO_NAME); \ export PULL_NUMBER=$(PULL_NUMBER); \ export MODULES=$(MODULES); \ - ./scripts/check-multi-module.sh; \ + ./hack/check-multi-module.sh; \ ) .PHONY: diff --git a/api/filesys/doc.go b/api/filesys/doc.go new file mode 100644 index 000000000..bd3963441 --- /dev/null +++ b/api/filesys/doc.go @@ -0,0 +1,7 @@ +// Copyright 2019 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 + +// Package filesys provides a file system abstraction, +// a subset of that provided by golang.org/pkg/os, +// with an on-disk and in-memory representation. +package filesys diff --git a/api/filesys/filesystem.go b/api/filesys/filesystem.go index 041b4bdb3..2d8caf2b8 100644 --- a/api/filesys/filesystem.go +++ b/api/filesys/filesystem.go @@ -1,7 +1,6 @@ // Copyright 2019 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 -// Package filesys provides a file system abstraction layer. package filesys import ( diff --git a/api/filters/doc.go b/api/filters/doc.go new file mode 100644 index 000000000..8ced59dd1 --- /dev/null +++ b/api/filters/doc.go @@ -0,0 +1,5 @@ +package filters + +// Package filters collects various implementations +// sigs.k8s.io/kustomize/kyaml/kio.Filter used by kustomize +// transformers to modify kubernetes objects. diff --git a/api/internal/plugins/doc.go b/api/internal/plugins/doc.go index 74d8ae378..5755f1750 100644 --- a/api/internal/plugins/doc.go +++ b/api/internal/plugins/doc.go @@ -94,9 +94,6 @@ TO GENERATE CODE cd $repo/plugin/builtin go generate ./... -See scripts/kyaml-pre-commit.sh for canonical way -to execute the above. - This creates $repo/api/plugins/builtins/SecretGenerator.go diff --git a/api/konfig/doc.go b/api/konfig/doc.go index 44f659afb..8c5f8f2cd 100644 --- a/api/konfig/doc.go +++ b/api/konfig/doc.go @@ -2,5 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // Package konfig provides configuration methods and constants -// for the kustomize API. +// for the kustomize API, e.g. the set of file names to look for +// to identify a kustomization root. package konfig diff --git a/examples/README.md b/examples/README.md index 2819d5408..42ef08525 100644 --- a/examples/README.md +++ b/examples/README.md @@ -5,15 +5,15 @@ English | [简体中文](zh/README.md) To run these examples, your `$PATH` must contain `kustomize`. See the [installation instructions](../docs/INSTALL.md). -These examples are [tested](../scripts/kyaml-pre-commit.sh) +These examples are [tested](../hack/testExamplesAgainstKustomize.sh) to work with the latest _released_ version of kustomize. Basic Usage - * [valueAdd](valueAdd.md) - + * [valueAdd](valueAdd.md) - Add a simple string value easily to various fields, including fields that happen to hold file paths. - + * [configGenerations](configGeneration.md) - Rolling update when ConfigMapGenerator changes. diff --git a/examples/zh/README.md b/examples/zh/README.md index b4a69360a..52c58a337 100644 --- a/examples/zh/README.md +++ b/examples/zh/README.md @@ -4,7 +4,7 @@ 这些示例默认 `kustomize` 在您的 `$PATH` 中。 -这些示例通过了 [pre-commit](../../scripts/kyaml-pre-commit.sh) 测试,并且应该与 HEAD 一起使用。 +这些示例通过了 [pre-commit](../../hack/testExamplesAgainstKustomize.sh) 测试,并且应该与 HEAD 一起使用。 ``` go get sigs.k8s.io/kustomize/v3/cmd/kustomize @@ -58,4 +58,4 @@ go get sigs.k8s.io/kustomize/v3/cmd/kustomize * [multibases](multibases.md) - 使用相同的 base 生成三个 variants(dev,staging,production)。 ->声明:部分文档可能稍微滞后于英文版本,同步工作持续进行中 \ No newline at end of file +>声明:部分文档可能稍微滞后于英文版本,同步工作持续进行中 diff --git a/scripts/Invoke-PreCommit.ps1 b/hack/Invoke-PreCommit.ps1 similarity index 100% rename from scripts/Invoke-PreCommit.ps1 rename to hack/Invoke-PreCommit.ps1 diff --git a/scripts/check-go-mod.sh b/hack/check-go-mod.sh similarity index 100% rename from scripts/check-go-mod.sh rename to hack/check-go-mod.sh diff --git a/scripts/check-multi-module.sh b/hack/check-multi-module.sh similarity index 100% rename from scripts/check-multi-module.sh rename to hack/check-multi-module.sh diff --git a/scripts/kyaml-pre-commit.sh b/hack/kyaml-pre-commit.sh similarity index 100% rename from scripts/kyaml-pre-commit.sh rename to hack/kyaml-pre-commit.sh