Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions prow/config/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ type JobsConfig struct {
}

type Job struct {
Name string `json:"name,omitempty"`
Command []string `json:"command,omitempty"`
Types []string `json:"types,omitempty"`
Timeout *prowjob.Duration `json:"timeout,omitempty"`
Repos []string `json:"repos,omitempty"`
Regex string `json:"regex,omitempty"`
MaxConcurrency int `json:"max_concurrency,omitempty"`
Name string `json:"name,omitempty"`
Command []string `json:"command,omitempty"`
Types []string `json:"types,omitempty"`
Timeout *prowjob.Duration `json:"timeout,omitempty"`
Repos []string `json:"repos,omitempty"`
Regex string `json:"regex,omitempty"`
MaxConcurrency int `json:"max_concurrency,omitempty"`
ReporterConfig *prowjob.ReporterConfig `json:"reporter_config,omitempty"`

Env []v1.EnvVar `json:"env,omitempty"`
Image string `json:"image,omitempty"`
Expand Down Expand Up @@ -662,9 +663,10 @@ func createJobBase(globalConfig GlobalConfig, jobConfig JobsConfig, job Job,
Decorate: &yes,
ExtraRefs: createExtraRefs(job.Repos, branch, globalConfig.PathAliases),
},
Labels: job.Labels,
Annotations: job.Annotations,
Cluster: job.Cluster,
ReporterConfig: job.ReporterConfig,
Labels: job.Labels,
Annotations: job.Annotations,
Cluster: job.Cluster,
}
if jb.Labels == nil {
jb.Labels = map[string]string{}
Expand Down
9 changes: 9 additions & 0 deletions prow/config/jobs/test-infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ jobs:
- name: deploy-prow
types: [postsubmit]
regex: '^prow/cluster/(?:gcsweb/|velodrome/|monitoring/|build/|private/|[^/]+\.yaml$)'
reporter_config:
slack:
channel: "oncall"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't every pustsubmit already report to slack? is this just so it goes to oncall instead of test-failures?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah they report on faillures and the reports are mixed with all other jobs

channel: test-failures
. This is for replacing the manual post from oncall, so that we have one less thing to do on Mondays

job_states_to_report:
- success
- failure
- aborted
- error
report_template: 'Deploying prow: {{.Status.State}}. <{{.Spec.Refs.BaseLink}}|Commit {{.Spec.Refs.BaseSHA}}> <{{.Status.URL}}|View logs> <https://testgrid.k8s.io/istio_test-infra_postsubmit#deploy-prow_test-infra_postsubmit|Job history on Testgrid>'
cluster: test-infra-trusted
max_concurrency: 1
command:
Expand Down
75 changes: 38 additions & 37 deletions prow/genjobs/cmd/genjobs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,43 +67,44 @@ type configuration struct {

// transform are the available transformation fields.
type transform struct {
Annotations map[string]string `json:"annotations,omitempty"`
Bucket string `json:"bucket,omitempty"`
Cluster string `json:"cluster,omitempty"`
Channel string `json:"channel,omitempty"`
SSHKeySecret string `json:"ssh-key-secret,omitempty"`
Modifier string `json:"modifier,omitempty"`
Input string `json:"input,omitempty"`
Output string `json:"output,omitempty"`
Sort string `json:"sort,omitempty"`
ExtraRefs []prowjob.Refs `json:"extra-refs,omitempty"`
Branches []string `json:"branches,omitempty"`
BranchesOut []string `json:"branches-out,omitempty"`
RefBranchOut string `json:"ref-branch-out,omitempty"`
Presets []string `json:"presets,omitempty"`
RerunOrgs []string `json:"rerun-orgs,omitempty"`
RerunUsers []string `json:"rerun-users,omitempty"`
EnvDenylist []string `json:"env-denylist,omitempty"`
VolumeDenylist []string `json:"volume-denylist,omitempty"`
JobAllowlist []string `json:"job-allowlist,omitempty"`
JobDenylist []string `json:"job-denylist,omitempty"`
RepoAllowlist []string `json:"repo-allowlist,omitempty"`
RepoDenylist []string `json:"repo-denylist,omitempty"`
JobType []string `json:"job-type,omitempty"`
Selector map[string]string `json:"selector,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Env map[string]string `json:"env,omitempty"`
RefOrgMap map[string]string `json:"ref-mapping,omitempty"`
OrgMap map[string]string `json:"mapping,omitempty"`
Clean bool `json:"clean,omitempty"`
DryRun bool `json:"dry-run,omitempty"`
Refs bool `json:"refs,omitempty"`
Resolve bool `json:"resolve,omitempty"`
SSHClone bool `json:"ssh-clone,omitempty"`
OverrideSelector bool `json:"override-selector,omitempty"`
SupportGerritReporting bool `json:"support-gerrit-reporting,omitempty"`
AllowLongJobNames bool `json:"allow-long-job-names,omitempty"`
Verbose bool `json:"verbose,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
Bucket string `json:"bucket,omitempty"`
Cluster string `json:"cluster,omitempty"`
Channel string `json:"channel,omitempty"`
SSHKeySecret string `json:"ssh-key-secret,omitempty"`
Modifier string `json:"modifier,omitempty"`
Input string `json:"input,omitempty"`
Output string `json:"output,omitempty"`
Sort string `json:"sort,omitempty"`
ExtraRefs []prowjob.Refs `json:"extra-refs,omitempty"`
ReporterConfig *prowjob.ReporterConfig `json:"reporter_config,omitempty"`
Branches []string `json:"branches,omitempty"`
BranchesOut []string `json:"branches-out,omitempty"`
RefBranchOut string `json:"ref-branch-out,omitempty"`
Presets []string `json:"presets,omitempty"`
RerunOrgs []string `json:"rerun-orgs,omitempty"`
RerunUsers []string `json:"rerun-users,omitempty"`
EnvDenylist []string `json:"env-denylist,omitempty"`
VolumeDenylist []string `json:"volume-denylist,omitempty"`
JobAllowlist []string `json:"job-allowlist,omitempty"`
JobDenylist []string `json:"job-denylist,omitempty"`
RepoAllowlist []string `json:"repo-allowlist,omitempty"`
RepoDenylist []string `json:"repo-denylist,omitempty"`
JobType []string `json:"job-type,omitempty"`
Selector map[string]string `json:"selector,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Env map[string]string `json:"env,omitempty"`
RefOrgMap map[string]string `json:"ref-mapping,omitempty"`
OrgMap map[string]string `json:"mapping,omitempty"`
Clean bool `json:"clean,omitempty"`
DryRun bool `json:"dry-run,omitempty"`
Refs bool `json:"refs,omitempty"`
Resolve bool `json:"resolve,omitempty"`
SSHClone bool `json:"ssh-clone,omitempty"`
OverrideSelector bool `json:"override-selector,omitempty"`
SupportGerritReporting bool `json:"support-gerrit-reporting,omitempty"`
AllowLongJobNames bool `json:"allow-long-job-names,omitempty"`
Verbose bool `json:"verbose,omitempty"`
}

// options are the available command-line flags.
Expand Down