Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 1 | #!/usr/bin/env python2.7 |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 2 | # Copyright 2017 gRPC authors. |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 3 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 7 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 9 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 15 | |
| 16 | # Dictionaries used for client matrix testing. |
| 17 | |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 18 | |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 19 | def get_github_repo(lang): |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 20 | return { |
Jakob Roland Andersen | 3ebfe92 | 2018-03-06 16:39:27 +0100 | [diff] [blame] | 21 | 'dart': 'https://github.com/grpc/grpc-dart.git', |
Eric Gribkoff | ca45554 | 2018-02-15 15:24:17 -0800 | [diff] [blame] | 22 | 'go': 'https://github.com/grpc/grpc-go.git', |
| 23 | 'java': 'https://github.com/grpc/grpc-java.git', |
| 24 | 'node': 'https://github.com/grpc/grpc-node.git', |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 25 | # all other languages use the grpc.git repo. |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame] | 26 | }.get(lang, 'https://github.com/grpc/grpc.git') |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 27 | |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 28 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 29 | def get_release_tags(lang): |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 30 | return map(lambda r: get_release_tag_name(r), LANG_RELEASE_MATRIX[lang]) |
| 31 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 32 | |
| 33 | def get_release_tag_name(release_info): |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 34 | assert len(release_info.keys()) == 1 |
| 35 | return release_info.keys()[0] |
| 36 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 37 | |
| 38 | def should_build_docker_interop_image_from_release_tag(lang): |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 39 | if lang in ['go', 'java', 'node']: |
| 40 | return False |
| 41 | return True |
| 42 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 43 | |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 44 | # Dictionary of runtimes per language |
| 45 | LANG_RUNTIME_MATRIX = { |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 46 | 'cxx': ['cxx'], # This is actually debian8. |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 47 | 'go': ['go1.7', 'go1.8'], |
Yong Ni | b92813b | 2017-05-31 12:07:09 -0700 | [diff] [blame] | 48 | 'java': ['java_oracle8'], |
Adele Zhou | a00f972 | 2017-11-15 15:12:02 -0800 | [diff] [blame] | 49 | 'python': ['python'], |
Adele Zhou | bcd23cd | 2017-11-01 15:42:00 -0700 | [diff] [blame] | 50 | 'node': ['node'], |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 51 | 'ruby': ['ruby'], |
Adele Zhou | 9fe79dc | 2017-11-02 14:08:29 -0700 | [diff] [blame] | 52 | 'php': ['php', 'php7'], |
Adele Zhou | f7f38d1 | 2017-11-02 17:57:54 -0700 | [diff] [blame] | 53 | 'csharp': ['csharp', 'csharpcoreclr'], |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | # Dictionary of releases per language. For each language, we need to provide |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 57 | # a release tag pointing to the latest build of the branch. |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 58 | LANG_RELEASE_MATRIX = { |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 59 | 'cxx': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 60 | { |
| 61 | 'v1.0.1': None |
| 62 | }, |
| 63 | { |
| 64 | 'v1.1.4': None |
| 65 | }, |
| 66 | { |
| 67 | 'v1.2.5': None |
| 68 | }, |
| 69 | { |
| 70 | 'v1.3.9': None |
| 71 | }, |
| 72 | { |
| 73 | 'v1.4.2': None |
| 74 | }, |
| 75 | { |
| 76 | 'v1.6.6': None |
| 77 | }, |
| 78 | { |
| 79 | 'v1.7.2': None |
| 80 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 81 | { |
| 82 | 'v1.8.0': None |
| 83 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame] | 84 | { |
| 85 | 'v1.9.1': None |
| 86 | }, |
Mehrdad Afshari | baefff2 | 2018-03-21 21:28:13 -0700 | [diff] [blame^] | 87 | { |
| 88 | 'v1.10.0': None |
| 89 | }, |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 90 | ], |
| 91 | 'go': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 92 | { |
| 93 | 'v1.0.5': None |
| 94 | }, |
| 95 | { |
| 96 | 'v1.2.1': None |
| 97 | }, |
| 98 | { |
| 99 | 'v1.3.0': None |
| 100 | }, |
| 101 | { |
| 102 | 'v1.4.2': None |
| 103 | }, |
| 104 | { |
| 105 | 'v1.5.2': None |
| 106 | }, |
| 107 | { |
| 108 | 'v1.6.0': None |
| 109 | }, |
| 110 | { |
| 111 | 'v1.7.4': None |
| 112 | }, |
| 113 | { |
Menghan Li | 5bbf9e5 | 2017-12-12 16:50:39 -0800 | [diff] [blame] | 114 | 'v1.8.2': None |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 115 | }, |
Menghan Li | 2146b3a | 2018-01-04 14:57:27 -0800 | [diff] [blame] | 116 | { |
Menghan Li | 63efbc6 | 2018-01-19 13:19:39 -0800 | [diff] [blame] | 117 | 'v1.9.2': None |
Menghan Li | 2146b3a | 2018-01-04 14:57:27 -0800 | [diff] [blame] | 118 | }, |
Menghan Li | ea1fefe | 2018-02-15 15:22:31 -0800 | [diff] [blame] | 119 | { |
| 120 | 'v1.10.0': None |
| 121 | }, |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 122 | ], |
| 123 | 'java': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 124 | { |
| 125 | 'v1.0.3': None |
| 126 | }, |
| 127 | { |
| 128 | 'v1.1.2': None |
| 129 | }, |
| 130 | { |
| 131 | 'v1.2.0': None |
| 132 | }, |
| 133 | { |
| 134 | 'v1.3.1': None |
| 135 | }, |
| 136 | { |
| 137 | 'v1.4.0': None |
| 138 | }, |
| 139 | { |
| 140 | 'v1.5.0': None |
| 141 | }, |
| 142 | { |
| 143 | 'v1.6.1': None |
| 144 | }, |
| 145 | { |
| 146 | 'v1.7.0': None |
| 147 | }, |
| 148 | { |
| 149 | 'v1.8.0': None |
| 150 | }, |
Kun Zhang | 07fb6b5 | 2018-01-11 14:27:25 -0800 | [diff] [blame] | 151 | { |
Eric Anderson | 540a104 | 2018-02-09 16:28:16 -0800 | [diff] [blame] | 152 | 'v1.9.1': None |
Kun Zhang | 07fb6b5 | 2018-01-11 14:27:25 -0800 | [diff] [blame] | 153 | }, |
Eric Gribkoff | 6dc65d9 | 2018-02-15 15:37:19 -0800 | [diff] [blame] | 154 | { |
| 155 | 'v1.10.0': None |
| 156 | }, |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 157 | ], |
Adele Zhou | a00f972 | 2017-11-15 15:12:02 -0800 | [diff] [blame] | 158 | 'python': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 159 | { |
| 160 | 'v1.0.x': None |
| 161 | }, |
| 162 | { |
| 163 | 'v1.1.4': None |
| 164 | }, |
| 165 | { |
| 166 | 'v1.2.5': None |
| 167 | }, |
| 168 | { |
| 169 | 'v1.3.9': None |
| 170 | }, |
| 171 | { |
| 172 | 'v1.4.2': None |
| 173 | }, |
| 174 | { |
| 175 | 'v1.6.6': None |
| 176 | }, |
| 177 | { |
| 178 | 'v1.7.2': None |
| 179 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 180 | { |
| 181 | 'v1.8.1': None # first python 1.8 release is 1.8.1 |
| 182 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame] | 183 | { |
| 184 | 'v1.9.1': None |
| 185 | }, |
Mehrdad Afshari | baefff2 | 2018-03-21 21:28:13 -0700 | [diff] [blame^] | 186 | { |
| 187 | 'v1.10.0': None |
| 188 | }, |
Adele Zhou | 4fba378 | 2017-11-14 17:43:37 -0800 | [diff] [blame] | 189 | ], |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 190 | 'node': [ |
murgatroid99 | 993769d | 2018-03-16 12:11:59 -0700 | [diff] [blame] | 191 | { |
| 192 | 'v1.0.1': None |
| 193 | }, |
Adele Zhou | 0e70223 | 2018-03-21 13:37:47 -0700 | [diff] [blame] | 194 | { |
| 195 | 'v1.1.4': None |
| 196 | }, |
| 197 | { |
| 198 | 'v1.2.5': None |
| 199 | }, |
| 200 | { |
| 201 | 'v1.3.9': None |
| 202 | }, |
| 203 | { |
| 204 | 'v1.4.2': None |
| 205 | }, |
| 206 | { |
| 207 | 'v1.6.6': None |
| 208 | }, |
Adele Zhou | 5657cd5 | 2018-03-21 11:30:28 -0700 | [diff] [blame] | 209 | # TODO: https://github.com/grpc/grpc-node/issues/235. |
| 210 | #{ |
| 211 | # 'v1.7.2': None |
| 212 | #}, |
murgatroid99 | dfb41b6 | 2018-03-16 10:13:31 -0700 | [diff] [blame] | 213 | { |
| 214 | 'v1.8.4': None |
| 215 | }, |
| 216 | { |
| 217 | 'v1.9.1': None |
Mehrdad Afshari | baefff2 | 2018-03-21 21:28:13 -0700 | [diff] [blame^] | 218 | }, |
| 219 | { |
| 220 | 'v1.10.0': None |
| 221 | }, |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 222 | ], |
| 223 | 'ruby': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 224 | { |
| 225 | 'v1.0.1': { |
| 226 | 'patch': [ |
| 227 | 'tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile', |
| 228 | 'tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh', |
| 229 | ] |
| 230 | } |
| 231 | }, |
| 232 | { |
| 233 | 'v1.1.4': None |
| 234 | }, |
| 235 | { |
| 236 | 'v1.2.5': None |
| 237 | }, |
| 238 | { |
| 239 | 'v1.3.9': None |
| 240 | }, |
| 241 | { |
| 242 | 'v1.4.2': None |
| 243 | }, |
| 244 | { |
| 245 | 'v1.6.6': None |
| 246 | }, |
| 247 | { |
| 248 | 'v1.7.2': None |
| 249 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 250 | { |
| 251 | 'v1.8.0': None |
| 252 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame] | 253 | { |
| 254 | 'v1.9.1': None |
| 255 | }, |
Mehrdad Afshari | baefff2 | 2018-03-21 21:28:13 -0700 | [diff] [blame^] | 256 | { |
| 257 | 'v1.10.0': None |
| 258 | }, |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 259 | ], |
Adele Zhou | 9fe79dc | 2017-11-02 14:08:29 -0700 | [diff] [blame] | 260 | 'php': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 261 | { |
| 262 | 'v1.0.1': None |
| 263 | }, |
| 264 | { |
| 265 | 'v1.1.4': None |
| 266 | }, |
| 267 | { |
| 268 | 'v1.2.5': None |
| 269 | }, |
| 270 | { |
| 271 | 'v1.3.9': None |
| 272 | }, |
| 273 | { |
| 274 | 'v1.4.2': None |
| 275 | }, |
| 276 | { |
| 277 | 'v1.6.6': None |
| 278 | }, |
| 279 | { |
| 280 | 'v1.7.2': None |
| 281 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 282 | { |
| 283 | 'v1.8.0': None |
| 284 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame] | 285 | { |
| 286 | 'v1.9.1': None |
| 287 | }, |
Mehrdad Afshari | baefff2 | 2018-03-21 21:28:13 -0700 | [diff] [blame^] | 288 | { |
| 289 | 'v1.10.0': None |
| 290 | }, |
Adele Zhou | 9fe79dc | 2017-11-02 14:08:29 -0700 | [diff] [blame] | 291 | ], |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 292 | 'csharp': [ |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 293 | #{'v1.0.1': None}, |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 294 | { |
| 295 | 'v1.1.4': None |
| 296 | }, |
| 297 | { |
| 298 | 'v1.2.5': None |
| 299 | }, |
| 300 | { |
| 301 | 'v1.3.9': None |
| 302 | }, |
| 303 | { |
| 304 | 'v1.4.2': None |
| 305 | }, |
| 306 | { |
| 307 | 'v1.6.6': None |
| 308 | }, |
| 309 | { |
| 310 | 'v1.7.2': None |
| 311 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 312 | { |
| 313 | 'v1.8.0': None |
| 314 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame] | 315 | { |
| 316 | 'v1.9.1': None |
| 317 | }, |
Mehrdad Afshari | baefff2 | 2018-03-21 21:28:13 -0700 | [diff] [blame^] | 318 | { |
| 319 | 'v1.10.0': None |
| 320 | }, |
Adele Zhou | f7f38d1 | 2017-11-02 17:57:54 -0700 | [diff] [blame] | 321 | ], |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 322 | } |
Adele Zhou | 46fb165 | 2018-03-19 15:33:46 -0700 | [diff] [blame] | 323 | |
| 324 | # This matrix lists the version of testcases to use for a release. As new |
| 325 | # releases come out, some older docker commands for running tests need to be |
| 326 | # changed, hence the need for specifying which commands to use for a |
| 327 | # particular version in some cases. If not specified, xxx__master file will be |
| 328 | # used. For example, all java versions will run the commands in java__master. |
| 329 | # The testcases files exist under the testcases directory. |
| 330 | TESTCASES_VERSION_MATRIX = { |
| 331 | 'node_v1.0.1': 'node__v1.0.1', |
| 332 | 'node_v1.1.4': 'node__v1.1.4', |
| 333 | 'node_v1.2.5': 'node__v1.1.4', |
| 334 | 'node_v1.3.9': 'node__v1.1.4', |
| 335 | 'node_v1.4.2': 'node__v1.1.4', |
| 336 | 'node_v1.6.6': 'node__v1.1.4', |
| 337 | 'ruby_v1.0.1': 'ruby__v1.0.1', |
| 338 | 'csharp_v1.1.4': 'csharp__v1.1.4', |
| 339 | 'csharp_v1.2.5': 'csharp__v1.1.4', |
| 340 | } |