5.10.16

Importing kuberentes e2e's as an artifact.

Just for fun ! I'm not sure this really is something most people ever want to do in the common scenario, but its possible :)

0) go get kubernetes into your GOPATH.  Also go get go-bindata.

1) Create a *go file which references kube.  Make sure kube is in your GOPATH.

import "k8s.io/kubernetes/test/e2e/framework"

2) go get ./... , this should give you an error at the end "undefined generated.Asset".

3) Run the kubernetes build in the kube go path for the e2es.  hack/build-go.sh test/e2e/e2e.test

4) Re run (2) .  This time it should compile

5) Now enable vendoring.  Read about it as you need to.  You will want to use Godep and vendoring so that you can check in the results of (3) in your vendored deps.  After all, the raw Go source isnt enough, you need the generated assets.


What else? 

Well obviously since pure kube e2e wont import as a compile time dependency, you can use Godeps to vendor it, and push the generated / Asset files up.    Then your fork will have what you need to compile and use.

No comments:

Post a Comment