Integrate builds in openshift origin

Merge of build work into origin repository. Includes API client for origin and k8s.


> On Sep 6, 2014, at 4:25 PM, Paul Morie <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
> —
> Reply to this email directly or view it on GitHub.