go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/tricium/use_gerrit_projects_in_location_regexp.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 = [ 9 cq.refset("https://example.googlesource.com/proj/repo1"), 10 cq.refset("https://example-internal.googlesource.com/proj/repo2"), 11 cq.refset("https://example.googlesource.com/proj/repo3"), 12 cq.refset("https://example-internal.googlesource.com/proj/repo4"), 13 ], 14 acls = [ 15 acl.entry(acl.CQ_COMMITTER, groups = ["committer"]), 16 ], 17 verifiers = [ 18 luci.cq_tryjob_verifier( 19 builder = "infra:analyzer/go-linter", 20 owner_whitelist = ["project-contributor"], 21 location_filters = [ 22 cq.location_filter( 23 gerrit_host_regexp = "example-review.googlesource.com", 24 gerrit_project_regexp = "proj/repo1", 25 path_regexp = ".+\\.go", 26 ), 27 cq.location_filter( 28 gerrit_host_regexp = "example-internal-review.googlesource.com", 29 gerrit_project_regexp = "proj/repo2", 30 path_regexp = ".+\\.go", 31 ), 32 ], 33 mode_allowlist = [cq.MODE_ANALYZER_RUN], 34 ), 35 luci.cq_tryjob_verifier( 36 builder = "infra:analyzer/spell-checker", 37 owner_whitelist = ["project-contributor"], 38 location_filters = [ 39 cq.location_filter( 40 gerrit_host_regexp = "example-review.googlesource.com", 41 gerrit_project_regexp = "proj/repo1", 42 path_regexp = ".*", 43 ), 44 cq.location_filter( 45 gerrit_host_regexp = "example-internal-review.googlesource.com", 46 gerrit_project_regexp = "proj/repo2", 47 path_regexp = ".+", 48 ), 49 ], 50 mode_allowlist = [cq.MODE_ANALYZER_RUN], 51 ), 52 ], 53 ) 54 55 # Expect configs: 56 # 57 # === commit-queue.cfg 58 # config_groups { 59 # name: "main" 60 # gerrit { 61 # url: "https://example-review.googlesource.com" 62 # projects { 63 # name: "proj/repo1" 64 # ref_regexp: "refs/heads/main" 65 # } 66 # projects { 67 # name: "proj/repo3" 68 # ref_regexp: "refs/heads/main" 69 # } 70 # } 71 # gerrit { 72 # url: "https://example-internal-review.googlesource.com" 73 # projects { 74 # name: "proj/repo2" 75 # ref_regexp: "refs/heads/main" 76 # } 77 # projects { 78 # name: "proj/repo4" 79 # ref_regexp: "refs/heads/main" 80 # } 81 # } 82 # verifiers { 83 # gerrit_cq_ability { 84 # committer_list: "committer" 85 # } 86 # tryjob { 87 # builders { 88 # name: "infra/analyzer/go-linter" 89 # location_filters { 90 # gerrit_host_regexp: "example-review.googlesource.com" 91 # gerrit_project_regexp: "proj/repo1" 92 # path_regexp: ".+\\.go" 93 # } 94 # location_filters { 95 # gerrit_host_regexp: "example-internal-review.googlesource.com" 96 # gerrit_project_regexp: "proj/repo2" 97 # path_regexp: ".+\\.go" 98 # } 99 # owner_whitelist_group: "project-contributor" 100 # mode_allowlist: "ANALYZER_RUN" 101 # } 102 # builders { 103 # name: "infra/analyzer/spell-checker" 104 # location_filters { 105 # gerrit_host_regexp: "example-review.googlesource.com" 106 # gerrit_project_regexp: "proj/repo1" 107 # path_regexp: ".*" 108 # } 109 # location_filters { 110 # gerrit_host_regexp: "example-internal-review.googlesource.com" 111 # gerrit_project_regexp: "proj/repo2" 112 # path_regexp: ".+" 113 # } 114 # owner_whitelist_group: "project-contributor" 115 # mode_allowlist: "ANALYZER_RUN" 116 # } 117 # retry_config { 118 # single_quota: 1 119 # global_quota: 2 120 # failure_weight: 100 121 # transient_failure_weight: 1 122 # timeout_weight: 100 123 # } 124 # } 125 # } 126 # } 127 # === 128 # 129 # === project.cfg 130 # name: "foo" 131 # === 132 # 133 # === realms.cfg 134 # realms { 135 # name: "@root" 136 # } 137 # === 138 # 139 # === tricium-prod.cfg 140 # functions { 141 # type: ANALYZER 142 # name: "InfraAnalyzerGoLinter" 143 # needs: GIT_FILE_DETAILS 144 # provides: RESULTS 145 # path_filters: "*.go" 146 # impls { 147 # provides_for_platform: LINUX 148 # runtime_platform: LINUX 149 # recipe { 150 # project: "infra" 151 # bucket: "analyzer" 152 # builder: "go-linter" 153 # } 154 # } 155 # } 156 # functions { 157 # type: ANALYZER 158 # name: "InfraAnalyzerSpellChecker" 159 # needs: GIT_FILE_DETAILS 160 # provides: RESULTS 161 # impls { 162 # provides_for_platform: LINUX 163 # runtime_platform: LINUX 164 # recipe { 165 # project: "infra" 166 # bucket: "analyzer" 167 # builder: "spell-checker" 168 # } 169 # } 170 # } 171 # selections { 172 # function: "InfraAnalyzerGoLinter" 173 # platform: LINUX 174 # } 175 # selections { 176 # function: "InfraAnalyzerSpellChecker" 177 # platform: LINUX 178 # } 179 # repos { 180 # gerrit_project { 181 # host: "example-review.googlesource.com" 182 # project: "proj/repo1" 183 # git_url: "https://example.googlesource.com/proj/repo1" 184 # } 185 # whitelisted_group: "project-contributor" 186 # } 187 # repos { 188 # gerrit_project { 189 # host: "example-internal-review.googlesource.com" 190 # project: "proj/repo2" 191 # git_url: "https://example-internal.googlesource.com/proj/repo2" 192 # } 193 # whitelisted_group: "project-contributor" 194 # } 195 # service_account: "tricium-prod@appspot.gserviceaccount.com" 196 # ===