Integrate builds in openshift origin

Merge of build work into origin repository. Includes API client for origin and k8s.
I'll allow it

On Sunday, September 7, 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 {
>
> Because a lot of the objects aren't really pass by value (slices,
> pointers) and trusting to pass by value to defend against modification is
> incorrect in that case.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/openshift/origin/pull/43/files#r17215564>.
>