Skip to content

Commit

Permalink
Merge pull request #22486 from chaodaiG/crier-always-upload
Browse files Browse the repository at this point in the history
skip_report flag in prowjob only used by crier reporters that report back to CI system
  • Loading branch information
k8s-ci-robot authored Jun 9, 2021
2 parents 7b3bb72 + 1bc0635 commit 2eb997a
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 52 deletions.
2 changes: 1 addition & 1 deletion prow/crier/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (r *reconciler) reconcile(ctx context.Context, log *logrus.Entry, req recon

log = log.WithField("jobName", pj.Spec.Job)

if !pj.Spec.Report || !r.reporter.ShouldReport(ctx, log, &pj) {
if !r.reporter.ShouldReport(ctx, log, &pj) {
return nil, nil
}

Expand Down
4 changes: 4 additions & 0 deletions prow/crier/reporters/gerrit/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ func (c *Client) GetName() string {

// ShouldReport returns if this prowjob should be reported by the gerrit reporter
func (c *Client) ShouldReport(ctx context.Context, log *logrus.Entry, pj *v1.ProwJob) bool {
if !pj.Spec.Report {
return false
}

ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
defer cancel()

Expand Down
Loading

0 comments on commit 2eb997a

Please sign in to comment.