go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/notifiable/tree_closer.star (about) 1 luci.project( 2 name = "project", 3 buildbucket = "cr-buildbucket.appspot.com", 4 notify = "luci-notify.appspot.com", 5 swarming = "chromium-swarm.appspot.com", 6 ) 7 luci.notify(tree_closing_enabled = True) 8 luci.bucket(name = "bucket") 9 luci.builder( 10 name = "builder 1", 11 bucket = "bucket", 12 executable = luci.recipe(name = "noop", cipd_package = "noop"), 13 notifies = [ 14 luci.notifier( 15 name = "email notifier", 16 on_occurrence = ["FAILURE"], 17 notify_emails = ["a@example.com"], 18 ), 19 "tree closer", 20 ], 21 ) 22 luci.builder( 23 name = "builder 2", 24 bucket = "bucket", 25 executable = "noop", 26 repo = "https://repo.example.com", 27 ) 28 luci.tree_closer( 29 name = "tree closer", 30 tree_status_host = "some-tree.example.com", 31 failed_step_regexp = "failed-step-regexp", 32 failed_step_regexp_exclude = ["regex1", "or maybe regex 2"], 33 template = luci.notifier_template( 34 name = "tree_status", 35 body = "boom\n", 36 ), 37 notified_by = ["builder 2"], 38 ) 39 # Expect configs: 40 # 41 # === cr-buildbucket.cfg 42 # buckets { 43 # name: "bucket" 44 # swarming { 45 # builders { 46 # name: "builder 1" 47 # swarming_host: "chromium-swarm.appspot.com" 48 # recipe { 49 # name: "noop" 50 # cipd_package: "noop" 51 # cipd_version: "refs/heads/main" 52 # } 53 # } 54 # builders { 55 # name: "builder 2" 56 # swarming_host: "chromium-swarm.appspot.com" 57 # recipe { 58 # name: "noop" 59 # cipd_package: "noop" 60 # cipd_version: "refs/heads/main" 61 # } 62 # } 63 # } 64 # } 65 # === 66 # 67 # === luci-notify.cfg 68 # notifiers { 69 # notifications { 70 # on_occurrence: FAILURE 71 # email { 72 # recipients: "a@example.com" 73 # } 74 # } 75 # builders { 76 # bucket: "bucket" 77 # name: "builder 1" 78 # } 79 # tree_closers { 80 # tree_status_host: "some-tree.example.com" 81 # failed_step_regexp: "failed-step-regexp" 82 # failed_step_regexp_exclude: "regex1|or maybe regex 2" 83 # template: "tree_status" 84 # } 85 # } 86 # notifiers { 87 # builders { 88 # bucket: "bucket" 89 # name: "builder 2" 90 # repository: "https://repo.example.com" 91 # } 92 # tree_closers { 93 # tree_status_host: "some-tree.example.com" 94 # failed_step_regexp: "failed-step-regexp" 95 # failed_step_regexp_exclude: "regex1|or maybe regex 2" 96 # template: "tree_status" 97 # } 98 # } 99 # tree_closing_enabled: true 100 # === 101 # 102 # === luci-notify/email-templates/tree_status.template 103 # boom 104 # === 105 # 106 # === project.cfg 107 # name: "project" 108 # === 109 # 110 # === realms.cfg 111 # realms { 112 # name: "@root" 113 # } 114 # realms { 115 # name: "bucket" 116 # } 117 # ===