Documentation ¶
Overview ¶
Package reporter contains helpers for publishing statues to Pub statuses in GitHub.
Index ¶
Constants ¶
View Source
const ( // PubSubProjectLabel annotation PubSubProjectLabel = "prow.k8s.io/pubsub.project" // PubSubTopicLabel annotation PubSubTopicLabel = "prow.k8s.io/pubsub.topic" // PubSubRunIDLabel annotation PubSubRunIDLabel = "prow.k8s.io/pubsub.runID" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a reporter client fed to crier controller
func NewReporter ¶
NewReporter creates a new Pub/Sub reporter
func (*Client) Report ¶
func (c *Client) Report(ctx context.Context, l *logrus.Entry, pj *prowapi.ProwJob) ([]*prowapi.ProwJob, *reconcile.Result, error)
Report takes a prowjob, and generate a pubsub ReportMessage and publish to specific Pub/Sub topic based on Pub/Sub related labels if they exist in this prowjob
type ReportMessage ¶
type ReportMessage struct { Project string `json:"project"` Topic string `json:"topic"` RunID string `json:"runid"` Status prowapi.ProwJobState `json:"status"` URL string `json:"url"` GCSPath string `json:"gcs_path"` Refs []prowapi.Refs `json:"refs,omitempty"` JobType prowapi.ProwJobType `json:"job_type"` JobName string `json:"job_name"` Message string `json:"message,omitempty"` }
ReportMessage is a message structure used to pass a prowjob status to Pub/Sub topic.s
Click to show internal directories.
Click to hide internal directories.