prow/kube/client.go
func (c *Client) CreateProwJob(j prowapi.ProwJob) (prowapi.ProwJob, error) {
	var representation string
	if out, err := json.Marshal(j); err == nil {
		representation = string(out[:])
	} else {
		representation = fmt.Sprintf("%v", j)
	}
	c.log("CreateProwJob", representation)
	var retJob prowapi.ProwJob
	err := c.request(&request{
		method:      http.MethodPost,
		path:        fmt.Sprintf("/apis/prow.k8s.io/v1/namespaces/%s/prowjobs", c.namespace),
		requestBody: &j,
	}, &retJob)
	return retJob, err
}
func (c *Client) CreateProwJob(j prowapi.ProwJob) (prowapi.ProwJob, error) {
	var representation string
	if out, err := json.Marshal(j); err == nil {
		representation = string(out[:])
	} else {
		representation = fmt.Sprintf("%v", j)
	}
	c.log("CreateProwJob", representation)
	var retJob prowapi.ProwJob
	err := c.request(&request{
		method:      http.MethodPost,
		path:        fmt.Sprintf("/apis/prow.k8s.io/v1/namespaces/%s/prowjobs", c.namespace),
		requestBody: &j,
	}, &retJob)
	return retJob, err
}
func ( c * Client ) CreateProwJob ( j prowapi . ProwJob ) ( prowapi . ProwJob , error ) { var representation string if out , err := json . Marshal ( j ) ; err == nil { representation = string ( out [ : ] ) } else { representation = fmt . Sprintf ( " " , j ) } c . log ( " " , representation ) var retJob prowapi . ProwJob err := c . request ( & request { method : http . MethodPost , path : fmt . Sprintf ( " " , c . namespace ) , requestBody : & j , } , & retJob ) return retJob , err }
// CreateProwJob creates a prowjob in the client's specified namespace.
//
// Analogous to kubectl create prowjob --namespace=client.namespace
CreateProwJob creates a prowjob in the client s specified namespace . Analogous to kubectl create prowjob -- namespace = client . namespace