Skip to content

Commit

Permalink
update how to build kubebuilder locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengqi Yu committed Nov 27, 2018
1 parent 99c17c9 commit ca294cb
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,15 @@ Please see https://git.k8s.io/community/CLA.md for more info.

## How to build kubebuilder locally

1. Setup tools
1. Download and setup [gcloud](https://cloud.google.com/sdk/docs/downloads-interactive)
1. Install `cloud-build-local` via `gcloud`
```bash
$ gcloud components install cloud-build-local
```
1. Build
1. Export `OUTPUT` to a location to write the directory containing the final build artifacts
```sh
$ export OUTPUT=/tmp/kubebuilder
```
2. Run container-builder:
```sh
$ cloud-build-local --config=build/cloudbuild_local.yaml --dryrun=false \
--write-workspace=$OUTPUT .
```
1. Extract `tar.gz` from $OUTPUT to /usr/local
```sh
$ go build -o /output/path/kubebuilder ./cmd
```

1. Test
```sh
go test ./pkg/...
```
```sh
$ ./test.sh
```

## Community, discussion and support

Expand Down

0 comments on commit ca294cb

Please sign in to comment.