Documentation ¶
Overview ¶
Package jobs implements methods on job information used by Prow component deck
Index ¶
- Variables
- type ConfigAgent
- type Finished
- type Job
- type JobAgent
- func (ja *JobAgent) GetJobLog(job, id string) ([]byte, error)
- func (ja *JobAgent) GetJobLogTail(job, id string, n int64) ([]byte, error)
- func (ja *JobAgent) GetProwJob(job, id string) (kube.ProwJob, error)
- func (ja *JobAgent) Jobs() []Job
- func (ja *JobAgent) ProwJobs() []kube.ProwJob
- func (ja *JobAgent) Start()
- type Metadata
- type PodLogClient
- type Started
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrProwjobNotFound = errors.New("Prowjob not found")
)
Functions ¶
This section is empty.
Types ¶
type ConfigAgent ¶
type Finished ¶
type Finished struct { Timestamp int64 `json:"timestamp"` Version string `json:"version"` JobVersion string `json:"job-version"` Passed bool `json:"passed"` Result string `json:"result"` Metadata `json:"metadata"` }
Finished is used to mirror the finished.json artifact
type Job ¶
type Job struct { Type string `json:"type"` Repo string `json:"repo"` Refs string `json:"refs"` BaseRef string `json:"base_ref"` BaseSHA string `json:"base_sha"` PullSHA string `json:"pull_sha"` Number int `json:"number"` Author string `json:"author"` Job string `json:"job"` BuildID string `json:"build_id"` Context string `json:"context"` Started string `json:"started"` Finished string `json:"finished"` Duration string `json:"duration"` State string `json:"state"` Description string `json:"description"` URL string `json:"url"` PodName string `json:"pod_name"` Agent kube.ProwJobAgent `json:"agent"` ProwJob string `json:"prow_job"` // contains filtered or unexported fields }
Job holds information about a job prow is running/has run. TODO(#5216): Remove this, and all associated machinery.
type JobAgent ¶
type JobAgent struct {
// contains filtered or unexported fields
}
JobAgent creates lists of jobs, updates their status and returns their run logs.
func NewJobAgent ¶
func NewJobAgent(kc serviceClusterClient, plClients map[string]PodLogClient, ca ConfigAgent) *JobAgent
NewJobAgent is a JobAgent constructor
func (*JobAgent) GetJobLog ¶
GetJobLog returns the job logs, works for both kubernetes and jenkins agent types.
func (*JobAgent) GetJobLogTail ¶
GetJobLogTail returns the last n bytes of the job logs, works for both kubernetes and jenkins agent types.
func (*JobAgent) GetProwJob ¶
GetProwJob finds the corresponding Prowjob resource from the provided job name and build ID
type PodLogClient ¶
Click to show internal directories.
Click to hide internal directories.