From aff94d6d7d1da94e0765a990e1fd6a1fbec3d639 Mon Sep 17 00:00:00 2001 From: Phillip Wittrock Date: Wed, 14 Mar 2018 20:35:49 -0700 Subject: [PATCH] Cleanup from previous repo --- build/cloudbuild.yaml | 2 +- build/cloudbuild_local.yaml | 2 +- build/test.sh | 8 ++++++-- cmd/internal/codegen/types.go | 2 +- docs/tools_user_guide.md | 4 ++-- test/scripts/build_kubebuilder.sh | 1 + 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/build/cloudbuild.yaml b/build/cloudbuild.yaml index 54c6aae78dd..dc6692a15a3 100644 --- a/build/cloudbuild.yaml +++ b/build/cloudbuild.yaml @@ -34,7 +34,7 @@ steps: - 'GOOS=${_GOOS}' - 'GOARCH=${_GOARCH}' - 'VERSION=${TAG_NAME}' -- name: "ubuntu" +- name: "golang:1.10-stretch" args: ["bash", "build/test.sh"] env: - 'GOOS=${_GOOS}' diff --git a/build/cloudbuild_local.yaml b/build/cloudbuild_local.yaml index 450843ae363..9c958dc2f81 100644 --- a/build/cloudbuild_local.yaml +++ b/build/cloudbuild_local.yaml @@ -42,7 +42,7 @@ steps: - 'GOOS=${_GOOS}' - 'GOARCH=${_GOARCH}' - 'VERSION=${TAG_NAME}' -- name: "ubuntu" +- name: "golang:1.10-stretch" args: ["bash", "build/test.sh"] env: - 'GOOS=${_GOOS}' diff --git a/build/test.sh b/build/test.sh index 8ac8d41cd68..a5de5dcc7d5 100755 --- a/build/test.sh +++ b/build/test.sh @@ -2,7 +2,10 @@ cp -r /workspace/_output/kubebuilder /tmp/kubebuilder/ -export GOPATH=/tmp/go +# Tests won't work on darwin +if [ $GOOS = "linux" ]; then + +export GOPATH=/go mkdir -p $GOPATH/src/github.com/kubernetes-sigs/kubebuilder-test/ cd $GOPATH/src/github.com/kubernetes-sigs/kubebuilder-test/ @@ -18,8 +21,9 @@ kubebuilder create resource --group insect --version v1beta1 --kind Bee kubebuilder create resource --group insect --version v1beta1 --kind Wasp # Verify the controller-manager builds and the tests pass -go install github.com/kubernetes-sigs/kubebuilder-test/cmd/controller-manager go build ./cmd/... go build ./pkg/... go test ./cmd/... go test ./pkg/... + +fi \ No newline at end of file diff --git a/cmd/internal/codegen/types.go b/cmd/internal/codegen/types.go index 17710182664..4be7512f6ee 100644 --- a/cmd/internal/codegen/types.go +++ b/cmd/internal/codegen/types.go @@ -73,7 +73,7 @@ func (apis *APIs) GetRules() []rbacv1.PolicyRule { } type APIGroup struct { - // Package is the name of the go package the api group is under - e.g. github.com/pwittrock/apiserver-helloworld/apis + // Package is the name of the go package the api group is under - e.g. github.com/me/apiserver-helloworld/apis Package string // Domain is the domain portion of the group - e.g. k8s.io Domain string diff --git a/docs/tools_user_guide.md b/docs/tools_user_guide.md index c32fdb3536e..43b20e0bd87 100644 --- a/docs/tools_user_guide.md +++ b/docs/tools_user_guide.md @@ -16,9 +16,9 @@ New API workflow: ## Download the latest release Make sure you downloaded and installed the latest release: -[here](https://github.com/pwittrock/kubebuilder/blob/master/docs/installing.md) +[here](https://github.com/kubernetes-sigs/kubebuilder/blob/master/docs/installing.md) -- Download the latest [release](https://github.com/pwittrock/kubebuilder/releases/) +- Download the latest [release](https://github.com/kubernetes-sigs/kubebuilder/releases/) - Extract the tar and move the kubebuilder/ directory to `/usr/local` (or somewhere else on your path) - Add `/usr/local/kubebuilder/bin` to your path - `export PATH=$PATH:/usr/local/kubebuilder/bin` - Set environment variables for starting test control planes diff --git a/test/scripts/build_kubebuilder.sh b/test/scripts/build_kubebuilder.sh index 84d6ea863af..a44c7fea9c4 100755 --- a/test/scripts/build_kubebuilder.sh +++ b/test/scripts/build_kubebuilder.sh @@ -8,6 +8,7 @@ go install github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder-gen go install github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder export VENDOR_KB=/tmp/vendorbin/vendor/github.com/kubernetes-sigs/kubebuilder + # Build vendor tar mkdir -p $VENDOR_KB/pkg/ || echo "" cp -r vendor/* /tmp/vendorbin/vendor/