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

     1  luci.project(
     2      name = "foo",
     3      tricium = "tricium-prod.appspot.com",
     4  )
     5  
     6  luci.cq_group(
     7      name = "main",
     8      watch = cq.refset(
     9          repo = "https://example.googlesource.com/repo1",
    10          refs = ["refs/heads/main"],
    11      ),
    12      acls = [
    13          acl.entry(acl.CQ_COMMITTER, groups = ["committer"]),
    14      ],
    15      verifiers = [
    16          luci.cq_tryjob_verifier(
    17              builder = "infra:analyzer/spell-checker",
    18              mode_allowlist = [cq.MODE_ANALYZER_RUN],
    19          ),
    20      ],
    21  )
    22  
    23  luci.cq_group(
    24      name = "other",
    25      watch = cq.refset(
    26          repo = "https://example.googlesource.com/repo1",
    27          refs = [".+"],
    28          refs_exclude = ["refs/heads/main"],
    29      ),
    30      acls = [
    31          acl.entry(acl.CQ_COMMITTER, groups = ["committer"]),
    32      ],
    33      verifiers = [
    34          luci.cq_tryjob_verifier(
    35              builder = "infra:analyzer/spell-checker",
    36              mode_allowlist = [cq.MODE_ANALYZER_RUN],
    37          ),
    38      ],
    39  )
    40  
    41  # Expect configs:
    42  #
    43  # === commit-queue.cfg
    44  # config_groups {
    45  #   name: "main"
    46  #   gerrit {
    47  #     url: "https://example-review.googlesource.com"
    48  #     projects {
    49  #       name: "repo1"
    50  #       ref_regexp: "refs/heads/main"
    51  #     }
    52  #   }
    53  #   verifiers {
    54  #     gerrit_cq_ability {
    55  #       committer_list: "committer"
    56  #     }
    57  #     tryjob {
    58  #       builders {
    59  #         name: "infra/analyzer/spell-checker"
    60  #         mode_allowlist: "ANALYZER_RUN"
    61  #       }
    62  #       retry_config {
    63  #         single_quota: 1
    64  #         global_quota: 2
    65  #         failure_weight: 100
    66  #         transient_failure_weight: 1
    67  #         timeout_weight: 100
    68  #       }
    69  #     }
    70  #   }
    71  # }
    72  # config_groups {
    73  #   name: "other"
    74  #   gerrit {
    75  #     url: "https://example-review.googlesource.com"
    76  #     projects {
    77  #       name: "repo1"
    78  #       ref_regexp: ".+"
    79  #       ref_regexp_exclude: "refs/heads/main"
    80  #     }
    81  #   }
    82  #   verifiers {
    83  #     gerrit_cq_ability {
    84  #       committer_list: "committer"
    85  #     }
    86  #     tryjob {
    87  #       builders {
    88  #         name: "infra/analyzer/spell-checker"
    89  #         mode_allowlist: "ANALYZER_RUN"
    90  #       }
    91  #       retry_config {
    92  #         single_quota: 1
    93  #         global_quota: 2
    94  #         failure_weight: 100
    95  #         transient_failure_weight: 1
    96  #         timeout_weight: 100
    97  #       }
    98  #     }
    99  #   }
   100  # }
   101  # ===
   102  #
   103  # === project.cfg
   104  # name: "foo"
   105  # ===
   106  #
   107  # === realms.cfg
   108  # realms {
   109  #   name: "@root"
   110  # }
   111  # ===
   112  #
   113  # === tricium-prod.cfg
   114  # functions {
   115  #   type: ANALYZER
   116  #   name: "InfraAnalyzerSpellChecker"
   117  #   needs: GIT_FILE_DETAILS
   118  #   provides: RESULTS
   119  #   impls {
   120  #     provides_for_platform: LINUX
   121  #     runtime_platform: LINUX
   122  #     recipe {
   123  #       project: "infra"
   124  #       bucket: "analyzer"
   125  #       builder: "spell-checker"
   126  #     }
   127  #   }
   128  # }
   129  # selections {
   130  #   function: "InfraAnalyzerSpellChecker"
   131  #   platform: LINUX
   132  # }
   133  # repos {
   134  #   gerrit_project {
   135  #     host: "example-review.googlesource.com"
   136  #     project: "repo1"
   137  #     git_url: "https://example.googlesource.com/repo1"
   138  #   }
   139  # }
   140  # service_account: "tricium-prod@appspot.gserviceaccount.com"
   141  # ===