Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Update Ingress godep #1247

Merged
merged 4 commits into from
Jun 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ that aren't part of the Kubernetes core.

The code must be checked out as a subdirectory of `k8s.io`, and not `github.com`.

```sh
```shell
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
# Replace "$YOUR_GITHUB_USERNAME" below with your github username
Expand All @@ -24,14 +24,38 @@ contrib contains multiple tiny projects, each with their own dependencies. Each
in contrib/ has it's own Godeps.json. For example the Godeps.json for Ingress
is Ingress/Godeps/Godeps.json. This means that godeps commands like `godep restore`
or `godep test` work in the root directory. Theys should be run from inside the
subproject directory you want to test
subproject directory you want to test.

## Prerequisites for updating Godeps

Since we vendor godeps through `/vendor` vs the old style `Godeps/_workspace`, you either need a more recent install of go and godeps, or you need to set `GO15VENDOREXPERIMENT=1`. Eg:
```shell
$ godep version
godep v74 (linux/amd64/go1.6.1)
$ go version
go version go1.6.1 linux/amd64
$ godep save ./...
```

Will automatically save godeps to `vendor/` instead of `_workspace/`.
If you have an older version of go, you must run:
```shell
$ GO15VENDOREXPERIMENT=1 godep save ./...
```

If you have an older version of godep, you must update it:
```shell
$ go get github.com/tools/godep
$ cd $GOPATH/src/github.com/tools/godep
$ go build -o godep *.go
```

## Updating Godeps

The most common dep to update is obviously going to be kuberetes proper. Updating
kubernetes and it's dependancies in the Ingress subproject for example can be done
as follows:
```
as follows (the example assumes you Kubernetes repo is rooted at `$GOPATH/src/github.com/kubernetes`, `s/github.com\/kubernetes/k8s.io/` as required):
```shell
cd $GOPATH/src/github.com/kubernetes/contrib/ingress
godep restore
go get -u github.com/kubernetes/kubernetes
Expand All @@ -46,7 +70,7 @@ git commit

Other deps are similar, although if the dep you wish to update is included from
kubernetes we probably want to stay in sync using the above method. If the dep is not in kubernetes proper something like the following should get you a nice clean result:
```
```shell
cd $GOPATH/src/github/kubernetes/contrib/ingress
godep restore
go get -u $SOME_DEP
Expand All @@ -59,6 +83,6 @@ git commit
## Running all tests

To run all go test in all projects do this:
```
```shell
./hack/for-go-proj.sh test
```
Loading