go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/misc/many_cq_milo_entries.star (about)

     1  luci.project(
     2      name = "project",
     3      buildbucket = "cr-buildbucket.appspot.com",
     4      milo = "luci-milo.appspot.com",
     5      swarming = "chromium-swarm.appspot.com",
     6  )
     7  luci.bucket(name = "bucket")
     8  luci.recipe(name = "noop", cipd_package = "noop")
     9  
    10  luci.cq_group(
    11      name = "cq group",
    12      watch = cq.refset("https://example.googlesource.com/repo"),
    13      acls = [
    14          acl.entry(acl.CQ_COMMITTER, groups = ["c"]),
    15      ],
    16  )
    17  
    18  luci.list_view(
    19      name = "list view",
    20  )
    21  
    22  def one(name):
    23      luci.builder(
    24          name = name,
    25          bucket = "bucket",
    26          executable = "noop",
    27          service_account = "noop@example.com",
    28      )
    29      luci.cq_tryjob_verifier(
    30          builder = name,
    31          cq_group = "cq group",
    32      )
    33      luci.list_view_entry(
    34          builder = name,
    35          list_view = "list view",
    36      )
    37  
    38  # 11 builders, to make sure we cover the case when "10" is lexicographically
    39  # before "2".
    40  one("builder-k")
    41  one("builder-j")
    42  one("builder-i")
    43  one("builder-h")
    44  one("builder-g")
    45  one("builder-f")
    46  one("builder-e")
    47  one("builder-d")
    48  one("builder-c")
    49  one("builder-b")
    50  one("builder-a")
    51  
    52  # commit-queue.cfg is in alphabetical order.
    53  # luci-milo.cfg is in definition order.
    54  
    55  # Expect configs:
    56  #
    57  # === commit-queue.cfg
    58  # config_groups {
    59  #   name: "cq group"
    60  #   gerrit {
    61  #     url: "https://example-review.googlesource.com"
    62  #     projects {
    63  #       name: "repo"
    64  #       ref_regexp: "refs/heads/main"
    65  #     }
    66  #   }
    67  #   verifiers {
    68  #     gerrit_cq_ability {
    69  #       committer_list: "c"
    70  #     }
    71  #     tryjob {
    72  #       builders {
    73  #         name: "project/bucket/builder-a"
    74  #       }
    75  #       builders {
    76  #         name: "project/bucket/builder-b"
    77  #       }
    78  #       builders {
    79  #         name: "project/bucket/builder-c"
    80  #       }
    81  #       builders {
    82  #         name: "project/bucket/builder-d"
    83  #       }
    84  #       builders {
    85  #         name: "project/bucket/builder-e"
    86  #       }
    87  #       builders {
    88  #         name: "project/bucket/builder-f"
    89  #       }
    90  #       builders {
    91  #         name: "project/bucket/builder-g"
    92  #       }
    93  #       builders {
    94  #         name: "project/bucket/builder-h"
    95  #       }
    96  #       builders {
    97  #         name: "project/bucket/builder-i"
    98  #       }
    99  #       builders {
   100  #         name: "project/bucket/builder-j"
   101  #       }
   102  #       builders {
   103  #         name: "project/bucket/builder-k"
   104  #       }
   105  #       retry_config {
   106  #         single_quota: 1
   107  #         global_quota: 2
   108  #         failure_weight: 100
   109  #         transient_failure_weight: 1
   110  #         timeout_weight: 100
   111  #       }
   112  #     }
   113  #   }
   114  # }
   115  # ===
   116  #
   117  # === cr-buildbucket.cfg
   118  # buckets {
   119  #   name: "bucket"
   120  #   swarming {
   121  #     builders {
   122  #       name: "builder-a"
   123  #       swarming_host: "chromium-swarm.appspot.com"
   124  #       recipe {
   125  #         name: "noop"
   126  #         cipd_package: "noop"
   127  #         cipd_version: "refs/heads/main"
   128  #       }
   129  #       service_account: "noop@example.com"
   130  #     }
   131  #     builders {
   132  #       name: "builder-b"
   133  #       swarming_host: "chromium-swarm.appspot.com"
   134  #       recipe {
   135  #         name: "noop"
   136  #         cipd_package: "noop"
   137  #         cipd_version: "refs/heads/main"
   138  #       }
   139  #       service_account: "noop@example.com"
   140  #     }
   141  #     builders {
   142  #       name: "builder-c"
   143  #       swarming_host: "chromium-swarm.appspot.com"
   144  #       recipe {
   145  #         name: "noop"
   146  #         cipd_package: "noop"
   147  #         cipd_version: "refs/heads/main"
   148  #       }
   149  #       service_account: "noop@example.com"
   150  #     }
   151  #     builders {
   152  #       name: "builder-d"
   153  #       swarming_host: "chromium-swarm.appspot.com"
   154  #       recipe {
   155  #         name: "noop"
   156  #         cipd_package: "noop"
   157  #         cipd_version: "refs/heads/main"
   158  #       }
   159  #       service_account: "noop@example.com"
   160  #     }
   161  #     builders {
   162  #       name: "builder-e"
   163  #       swarming_host: "chromium-swarm.appspot.com"
   164  #       recipe {
   165  #         name: "noop"
   166  #         cipd_package: "noop"
   167  #         cipd_version: "refs/heads/main"
   168  #       }
   169  #       service_account: "noop@example.com"
   170  #     }
   171  #     builders {
   172  #       name: "builder-f"
   173  #       swarming_host: "chromium-swarm.appspot.com"
   174  #       recipe {
   175  #         name: "noop"
   176  #         cipd_package: "noop"
   177  #         cipd_version: "refs/heads/main"
   178  #       }
   179  #       service_account: "noop@example.com"
   180  #     }
   181  #     builders {
   182  #       name: "builder-g"
   183  #       swarming_host: "chromium-swarm.appspot.com"
   184  #       recipe {
   185  #         name: "noop"
   186  #         cipd_package: "noop"
   187  #         cipd_version: "refs/heads/main"
   188  #       }
   189  #       service_account: "noop@example.com"
   190  #     }
   191  #     builders {
   192  #       name: "builder-h"
   193  #       swarming_host: "chromium-swarm.appspot.com"
   194  #       recipe {
   195  #         name: "noop"
   196  #         cipd_package: "noop"
   197  #         cipd_version: "refs/heads/main"
   198  #       }
   199  #       service_account: "noop@example.com"
   200  #     }
   201  #     builders {
   202  #       name: "builder-i"
   203  #       swarming_host: "chromium-swarm.appspot.com"
   204  #       recipe {
   205  #         name: "noop"
   206  #         cipd_package: "noop"
   207  #         cipd_version: "refs/heads/main"
   208  #       }
   209  #       service_account: "noop@example.com"
   210  #     }
   211  #     builders {
   212  #       name: "builder-j"
   213  #       swarming_host: "chromium-swarm.appspot.com"
   214  #       recipe {
   215  #         name: "noop"
   216  #         cipd_package: "noop"
   217  #         cipd_version: "refs/heads/main"
   218  #       }
   219  #       service_account: "noop@example.com"
   220  #     }
   221  #     builders {
   222  #       name: "builder-k"
   223  #       swarming_host: "chromium-swarm.appspot.com"
   224  #       recipe {
   225  #         name: "noop"
   226  #         cipd_package: "noop"
   227  #         cipd_version: "refs/heads/main"
   228  #       }
   229  #       service_account: "noop@example.com"
   230  #     }
   231  #   }
   232  # }
   233  # ===
   234  #
   235  # === luci-milo.cfg
   236  # consoles {
   237  #   id: "list view"
   238  #   name: "list view"
   239  #   builders {
   240  #     name: "buildbucket/luci.project.bucket/builder-k"
   241  #   }
   242  #   builders {
   243  #     name: "buildbucket/luci.project.bucket/builder-j"
   244  #   }
   245  #   builders {
   246  #     name: "buildbucket/luci.project.bucket/builder-i"
   247  #   }
   248  #   builders {
   249  #     name: "buildbucket/luci.project.bucket/builder-h"
   250  #   }
   251  #   builders {
   252  #     name: "buildbucket/luci.project.bucket/builder-g"
   253  #   }
   254  #   builders {
   255  #     name: "buildbucket/luci.project.bucket/builder-f"
   256  #   }
   257  #   builders {
   258  #     name: "buildbucket/luci.project.bucket/builder-e"
   259  #   }
   260  #   builders {
   261  #     name: "buildbucket/luci.project.bucket/builder-d"
   262  #   }
   263  #   builders {
   264  #     name: "buildbucket/luci.project.bucket/builder-c"
   265  #   }
   266  #   builders {
   267  #     name: "buildbucket/luci.project.bucket/builder-b"
   268  #   }
   269  #   builders {
   270  #     name: "buildbucket/luci.project.bucket/builder-a"
   271  #   }
   272  #   builder_view_only: true
   273  # }
   274  # ===
   275  #
   276  # === project.cfg
   277  # name: "project"
   278  # ===
   279  #
   280  # === realms.cfg
   281  # realms {
   282  #   name: "@root"
   283  # }
   284  # realms {
   285  #   name: "bucket"
   286  #   bindings {
   287  #     role: "role/buildbucket.builderServiceAccount"
   288  #     principals: "user:noop@example.com"
   289  #   }
   290  # }
   291  # ===