@@ -85,7 +85,9 @@ def build_test(cloud='aws',
85
85
build_cluster = None ,
86
86
cluster_name = None ,
87
87
template_path = None ,
88
- storage_e2e_cred = False ):
88
+ storage_e2e_cred = False ,
89
+ alert_email = None ,
90
+ alert_num_failures = None ):
89
91
# pylint: disable=too-many-statements,too-many-branches,too-many-arguments
90
92
if kops_version is None :
91
93
kops_deploy_url = marker_updown_green (None )
@@ -259,6 +261,11 @@ def build_test(cloud='aws',
259
261
'testgrid-days-of-results' : str (days_of_results ),
260
262
'testgrid-tab-name' : tab ,
261
263
}
264
+ if alert_email is not None :
265
+ annotations ['testgrid-alert-email' ] = alert_email
266
+ if alert_num_failures is not None :
267
+ annotations ['testgrid-num-failures-to-alert' ] = str (alert_num_failures )
268
+
262
269
for (k , v ) in spec .items ():
263
270
annotations [f"test.kops.k8s.io/{ k } " ] = v or ""
264
271
@@ -299,7 +306,9 @@ def presubmit_test(branch='master',
299
306
use_boskos = False ,
300
307
build_cluster = None ,
301
308
cluster_name = None ,
302
- use_preset_for_account_creds = None ):
309
+ use_preset_for_account_creds = None ,
310
+ alert_email = None ,
311
+ alert_num_failures = None ):
303
312
# pylint: disable=too-many-statements,too-many-branches,too-many-arguments
304
313
if cloud == 'aws' :
305
314
if distro == "channels" :
@@ -422,6 +431,11 @@ def presubmit_test(branch='master',
422
431
'testgrid-days-of-results' : '90' ,
423
432
'testgrid-tab-name' : tab_name or name ,
424
433
}
434
+ if alert_email is not None :
435
+ annotations ['testgrid-alert-email' ] = alert_email
436
+ if alert_num_failures is not None :
437
+ annotations ['testgrid-num-failures-to-alert' ] = str (alert_num_failures )
438
+
425
439
for (k , v ) in spec .items ():
426
440
annotations [f"test.kops.k8s.io/{ k } " ] = v or ""
427
441
@@ -932,7 +946,9 @@ def generate_misc():
932
946
test_args = "--master-os-distro=custom --node-os-distro=custom" ,
933
947
# Serial and Disruptive tests can be slow.
934
948
test_timeout_minutes = 120 ,
935
- runs_per_day = 3 ),
949
+ runs_per_day = 3 ,
950
+
951
+ alert_num_failures = 10 ),
936
952
937
953
# [sig-storage, @jsafrane] A one-off scenario testing all SELinux related feature gates enabled
938
954
# and opt-in selinux-warning-controller.
@@ -970,7 +986,9 @@ def generate_misc():
970
986
test_args = "--master-os-distro=custom --node-os-distro=custom" ,
971
987
# Serial and Disruptive tests can be slow.
972
988
test_timeout_minutes = 120 ,
973
- runs_per_day = 3 ),
989
+ runs_per_day = 3 ,
990
+
991
+ alert_num_failures = 10 ),
974
992
975
993
# test kube-up to kops jobs migration
976
994
build_test (name_override = "ci-kubernetes-e2e-cos-gce-canary" ,
0 commit comments