Integrate builds in openshift origin

Merge of build work into origin repository. Includes API client for origin and k8s.
Why?

On Saturday, September 6, 2014, Clayton Coleman <notifications@github.com>
wrote:

> In pkg/build/api/validation/validation.go:
>
> > +	errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors"
> > +	"github.com/openshift/origin/pkg/build/api"
> > +)
> > +
> > +// ValidateBuild tests required fields for a Build.
> > +func ValidateBuild(build *api.Build) errs.ErrorList {
> > +	allErrs := errs.ErrorList{}
> > +	if len(build.ID) == 0 {
> > +		allErrs = append(allErrs, errs.NewFieldRequired("id", build.ID))
> > +	}
> > +	allErrs = append(allErrs, ValidateBuildConfig(&build.Config).Prefix("Config")...)
> > +	return allErrs
> > +}
> > +
> > +// ValidateBuildConfig tests required fields for a Build.
> > +func ValidateBuildConfig(config *api.BuildConfig) errs.ErrorList {
>
>  On Sep 6, 2014, at 4:25 PM, Paul Morie <notifications@github.com
> <javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote: In
> pkg/build/api/validation/validation.go: > + errs "
> github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" > + "
> github.com/openshift/origin/pkg/build/api" > +) > + > +// ValidateBuild
> tests required fields for a Build. > +func ValidateBuild(build *api.Build)
> errs.ErrorList { > + allErrs := errs.ErrorList{} > + if len(build.ID) == 0
> { > + allErrs = append(allErrs, errs.NewFieldRequired("id", build.ID)) > +
> } > + allErrs = append(allErrs,
> ValidateBuildConfig(&build.Config).Prefix("Config")...) > + return allErrs
> > +} > + > +// ValidateBuildConfig tests required fields for a Build. >
> +func ValidateBuildConfig(config *api.BuildConfig) errs.ErrorList { Nit:
> these methods don't need to take pointers to a Build/BuildConfig because
> they do not alter the state of their parameters.
> In general we take pointers even if not changing, and upstream is
> switching over to use pointers in most places
> … <#1484d7c82a5ec046_>
>  — Reply to this email directly or view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/openshift/origin/pull/43/files#r17212122>.
>