Skip to content

Commit

Permalink
Merge pull request #495 from mengqiy/build_locally
Browse files Browse the repository at this point in the history
update how to build kubebuilder locally
  • Loading branch information
k8s-ci-robot committed Nov 27, 2018
2 parents 99c17c9 + ca294cb commit ab85f03
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 ab85f03

Please sign in to comment.