Accessible build logs

Adding option to retrieve logs form a build.
Usage:
        `kube buildLogs --id="buildID"`
You need to take a prefix via the constructor (that by default would be "").  You would preprend that to "/proxy/minion/..."


> On Sep 30, 2014, at 7:24 PM, jhadvig <notifications@github.com> wrote:
> 
> In pkg/build/registry/buildlog/rest.go:
> 
> > +// Redirector implementation
> > +func (r *REST) ResourceLocation(id string) (string, error) {
> > +	build, err := r.BuildRegistry.GetBuild(id)
> > +	if err != nil {
> > +		return "", fmt.Errorf("No such build")
> > +	}
> > +	pod, err := r.PodClient.GetPod(build.PodID)
> > +	if err != nil {
> > +		return "", fmt.Errorf("No such pod")
> > +	}
> > +
> > +	buildPodID := build.PodID
> > +	buildHost  := pod.CurrentState.Host
> > +	// Build will take place only in one container 
> > +	buildContainerName := pod.DesiredState.Manifest.Containers[0].Name
> > +	location, err := url.Parse("/proxy/minion/" + buildHost + "/containerLogs/" + buildPodID + "/" + buildContainerName)
> @smarterclayton so do I get it clear that the "/proxy/minion/" string in the url builder should be replaced by something more consistent ?
> 
> —
> Reply to this email directly or view it on GitHub.