go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/notifiable/minimal_notifier.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.bucket(name = "bucket")
     8  luci.recipe(name = "noop", cipd_package = "noop")
     9  luci.builder(
    10      name = "builder 1",
    11      bucket = "bucket",
    12      executable = "noop",
    13      notifies = [
    14          luci.notifier(
    15              name = "email notifier",
    16              on_occurrence = ["FAILURE"],
    17              notify_emails = ["a@example.com"],
    18          ),
    19      ],
    20  )
    21  luci.builder(
    22      name = "builder 2",
    23      bucket = "bucket",
    24      executable = "noop",
    25      repo = "https://repo.example.com",
    26      notifies = [
    27          luci.notifier(
    28              name = "blamelist notifier",
    29              on_occurrence = ["FAILURE"],
    30              notify_blamelist = True,
    31          ),
    32      ],
    33  )
    34  luci.builder(
    35      name = "builder 3",
    36      bucket = "bucket",
    37      executable = "noop",
    38      repo = "https://repo.example.com",
    39      notifies = [
    40          luci.notifier(
    41              name = "blamelist notifier with infra failures",
    42              on_occurrence = ["FAILURE", "INFRA_FAILURE"],
    43              notify_blamelist = True,
    44          ),
    45      ],
    46  )
    47  luci.builder(
    48      name = "builder 4",
    49      bucket = "bucket",
    50      executable = "noop",
    51      notifies = [
    52          luci.notifier(
    53              name = "notifier with regex filter",
    54              on_occurrence = ["FAILURE"],
    55              failed_step_regexp = ".*test.*",
    56          ),
    57      ],
    58  )
    59  luci.builder(
    60      name = "builder 5",
    61      bucket = "bucket",
    62      executable = "noop",
    63      notifies = [
    64          luci.notifier(
    65              name = "notifier with rotations",
    66              on_occurrence = ["FAILURE"],
    67              notify_rotation_urls = ["https://rota-ng.appspot.com/legacy/sheriff.json"],
    68          ),
    69      ],
    70  )
    71  
    72  # Expect configs:
    73  #
    74  # === cr-buildbucket.cfg
    75  # buckets {
    76  #   name: "bucket"
    77  #   swarming {
    78  #     builders {
    79  #       name: "builder 1"
    80  #       swarming_host: "chromium-swarm.appspot.com"
    81  #       recipe {
    82  #         name: "noop"
    83  #         cipd_package: "noop"
    84  #         cipd_version: "refs/heads/main"
    85  #       }
    86  #     }
    87  #     builders {
    88  #       name: "builder 2"
    89  #       swarming_host: "chromium-swarm.appspot.com"
    90  #       recipe {
    91  #         name: "noop"
    92  #         cipd_package: "noop"
    93  #         cipd_version: "refs/heads/main"
    94  #       }
    95  #     }
    96  #     builders {
    97  #       name: "builder 3"
    98  #       swarming_host: "chromium-swarm.appspot.com"
    99  #       recipe {
   100  #         name: "noop"
   101  #         cipd_package: "noop"
   102  #         cipd_version: "refs/heads/main"
   103  #       }
   104  #     }
   105  #     builders {
   106  #       name: "builder 4"
   107  #       swarming_host: "chromium-swarm.appspot.com"
   108  #       recipe {
   109  #         name: "noop"
   110  #         cipd_package: "noop"
   111  #         cipd_version: "refs/heads/main"
   112  #       }
   113  #     }
   114  #     builders {
   115  #       name: "builder 5"
   116  #       swarming_host: "chromium-swarm.appspot.com"
   117  #       recipe {
   118  #         name: "noop"
   119  #         cipd_package: "noop"
   120  #         cipd_version: "refs/heads/main"
   121  #       }
   122  #     }
   123  #   }
   124  # }
   125  # ===
   126  #
   127  # === luci-notify.cfg
   128  # notifiers {
   129  #   notifications {
   130  #     on_occurrence: FAILURE
   131  #     email {
   132  #       recipients: "a@example.com"
   133  #     }
   134  #   }
   135  #   builders {
   136  #     bucket: "bucket"
   137  #     name: "builder 1"
   138  #   }
   139  # }
   140  # notifiers {
   141  #   notifications {
   142  #     on_occurrence: FAILURE
   143  #     notify_blamelist {}
   144  #   }
   145  #   builders {
   146  #     bucket: "bucket"
   147  #     name: "builder 2"
   148  #     repository: "https://repo.example.com"
   149  #   }
   150  # }
   151  # notifiers {
   152  #   notifications {
   153  #     on_occurrence: FAILURE
   154  #     on_occurrence: INFRA_FAILURE
   155  #     notify_blamelist {}
   156  #   }
   157  #   builders {
   158  #     bucket: "bucket"
   159  #     name: "builder 3"
   160  #     repository: "https://repo.example.com"
   161  #   }
   162  # }
   163  # notifiers {
   164  #   notifications {
   165  #     on_occurrence: FAILURE
   166  #     failed_step_regexp: ".*test.*"
   167  #   }
   168  #   builders {
   169  #     bucket: "bucket"
   170  #     name: "builder 4"
   171  #   }
   172  # }
   173  # notifiers {
   174  #   notifications {
   175  #     on_occurrence: FAILURE
   176  #     email {
   177  #       rotation_urls: "https://rota-ng.appspot.com/legacy/sheriff.json"
   178  #     }
   179  #   }
   180  #   builders {
   181  #     bucket: "bucket"
   182  #     name: "builder 5"
   183  #   }
   184  # }
   185  # ===
   186  #
   187  # === project.cfg
   188  # name: "project"
   189  # ===
   190  #
   191  # === realms.cfg
   192  # realms {
   193  #   name: "@root"
   194  # }
   195  # realms {
   196  #   name: "bucket"
   197  # }
   198  # ===