Skip to content

Commit 4db983d

Browse files
authored
Merge pull request #33402 from rifelpet/kops-reporter
Kops - Notify slack when postsubmit job fails
2 parents 721d5a5 + e0648ca commit 4db983d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

config/jobs/image-pushing/k8s-staging-kops.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ postsubmits:
1717
# Build tags also
1818
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
1919
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
20+
reporter_config:
21+
slack:
22+
channel: "kops-dev"
23+
job_states_to_report:
24+
- failure
25+
- aborted
26+
- error
27+
report_template: 'Postsubmit push to staging failed: {{.Status.State}}. Commit: <{{.Spec.Refs.BaseLink}}|{{printf "%.7s" .Spec.Refs.BaseSHA}}> | <{{.Status.URL}}|Spyglass> | <https://testgrid.k8s.io/kops-misc#kops-postsubmit-push-to-staging|Testgrid> | <https://prow.k8s.io/?job={{.Spec.Job}}|Deck>'
2028
spec:
2129
serviceAccountName: gcb-builder
2230
containers:

0 commit comments

Comments
 (0)