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 { |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame^] | 21 | 'go': 'https://github.com:grpc/grpc-go.git', |
| 22 | 'java': 'https://github.com:grpc/grpc-java.git', |
| 23 | 'node': 'https://github.com:grpc/grpc-node.git', |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 24 | # all other languages use the grpc.git repo. |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame^] | 25 | }.get(lang, 'https://github.com/grpc/grpc.git') |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 26 | |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 27 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 28 | def get_release_tags(lang): |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 29 | return map(lambda r: get_release_tag_name(r), LANG_RELEASE_MATRIX[lang]) |
| 30 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 31 | |
| 32 | def get_release_tag_name(release_info): |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 33 | assert len(release_info.keys()) == 1 |
| 34 | return release_info.keys()[0] |
| 35 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 36 | |
| 37 | def should_build_docker_interop_image_from_release_tag(lang): |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 38 | if lang in ['go', 'java', 'node']: |
| 39 | return False |
| 40 | return True |
| 41 | |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 42 | |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 43 | # Dictionary of runtimes per language |
| 44 | LANG_RUNTIME_MATRIX = { |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 45 | 'cxx': ['cxx'], # This is actually debian8. |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 46 | 'go': ['go1.7', 'go1.8'], |
Yong Ni | b92813b | 2017-05-31 12:07:09 -0700 | [diff] [blame] | 47 | 'java': ['java_oracle8'], |
Adele Zhou | a00f972 | 2017-11-15 15:12:02 -0800 | [diff] [blame] | 48 | 'python': ['python'], |
Adele Zhou | bcd23cd | 2017-11-01 15:42:00 -0700 | [diff] [blame] | 49 | 'node': ['node'], |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 50 | 'ruby': ['ruby'], |
Adele Zhou | 9fe79dc | 2017-11-02 14:08:29 -0700 | [diff] [blame] | 51 | 'php': ['php', 'php7'], |
Adele Zhou | f7f38d1 | 2017-11-02 17:57:54 -0700 | [diff] [blame] | 52 | 'csharp': ['csharp', 'csharpcoreclr'], |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | # Dictionary of releases per language. For each language, we need to provide |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 56 | # a release tag pointing to the latest build of the branch. |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 57 | LANG_RELEASE_MATRIX = { |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 58 | 'cxx': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 59 | { |
| 60 | 'v1.0.1': None |
| 61 | }, |
| 62 | { |
| 63 | 'v1.1.4': None |
| 64 | }, |
| 65 | { |
| 66 | 'v1.2.5': None |
| 67 | }, |
| 68 | { |
| 69 | 'v1.3.9': None |
| 70 | }, |
| 71 | { |
| 72 | 'v1.4.2': None |
| 73 | }, |
| 74 | { |
| 75 | 'v1.6.6': None |
| 76 | }, |
| 77 | { |
| 78 | 'v1.7.2': None |
| 79 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 80 | { |
| 81 | 'v1.8.0': None |
| 82 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame^] | 83 | { |
| 84 | 'v1.9.1': None |
| 85 | }, |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 86 | ], |
| 87 | 'go': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 88 | { |
| 89 | 'v1.0.5': None |
| 90 | }, |
| 91 | { |
| 92 | 'v1.2.1': None |
| 93 | }, |
| 94 | { |
| 95 | 'v1.3.0': None |
| 96 | }, |
| 97 | { |
| 98 | 'v1.4.2': None |
| 99 | }, |
| 100 | { |
| 101 | 'v1.5.2': None |
| 102 | }, |
| 103 | { |
| 104 | 'v1.6.0': None |
| 105 | }, |
| 106 | { |
| 107 | 'v1.7.4': None |
| 108 | }, |
| 109 | { |
Menghan Li | 5bbf9e5 | 2017-12-12 16:50:39 -0800 | [diff] [blame] | 110 | 'v1.8.2': None |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 111 | }, |
Menghan Li | 2146b3a | 2018-01-04 14:57:27 -0800 | [diff] [blame] | 112 | { |
Menghan Li | 63efbc6 | 2018-01-19 13:19:39 -0800 | [diff] [blame] | 113 | 'v1.9.2': None |
Menghan Li | 2146b3a | 2018-01-04 14:57:27 -0800 | [diff] [blame] | 114 | }, |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 115 | ], |
| 116 | 'java': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 117 | { |
| 118 | 'v1.0.3': None |
| 119 | }, |
| 120 | { |
| 121 | 'v1.1.2': None |
| 122 | }, |
| 123 | { |
| 124 | 'v1.2.0': None |
| 125 | }, |
| 126 | { |
| 127 | 'v1.3.1': None |
| 128 | }, |
| 129 | { |
| 130 | 'v1.4.0': None |
| 131 | }, |
| 132 | { |
| 133 | 'v1.5.0': None |
| 134 | }, |
| 135 | { |
| 136 | 'v1.6.1': None |
| 137 | }, |
| 138 | { |
| 139 | 'v1.7.0': None |
| 140 | }, |
| 141 | { |
| 142 | 'v1.8.0': None |
| 143 | }, |
Kun Zhang | 07fb6b5 | 2018-01-11 14:27:25 -0800 | [diff] [blame] | 144 | { |
Eric Anderson | 540a104 | 2018-02-09 16:28:16 -0800 | [diff] [blame] | 145 | 'v1.9.1': None |
Kun Zhang | 07fb6b5 | 2018-01-11 14:27:25 -0800 | [diff] [blame] | 146 | }, |
Yong Ni | bbd348c | 2017-07-18 08:38:11 -0700 | [diff] [blame] | 147 | ], |
Adele Zhou | a00f972 | 2017-11-15 15:12:02 -0800 | [diff] [blame] | 148 | 'python': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 149 | { |
| 150 | 'v1.0.x': None |
| 151 | }, |
| 152 | { |
| 153 | 'v1.1.4': None |
| 154 | }, |
| 155 | { |
| 156 | 'v1.2.5': None |
| 157 | }, |
| 158 | { |
| 159 | 'v1.3.9': None |
| 160 | }, |
| 161 | { |
| 162 | 'v1.4.2': None |
| 163 | }, |
| 164 | { |
| 165 | 'v1.6.6': None |
| 166 | }, |
| 167 | { |
| 168 | 'v1.7.2': None |
| 169 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 170 | { |
| 171 | 'v1.8.1': None # first python 1.8 release is 1.8.1 |
| 172 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame^] | 173 | { |
| 174 | 'v1.9.1': None |
| 175 | }, |
Adele Zhou | 4fba378 | 2017-11-14 17:43:37 -0800 | [diff] [blame] | 176 | ], |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 177 | 'node': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 178 | { |
| 179 | 'v1.0.1': None |
| 180 | }, |
| 181 | { |
| 182 | 'v1.1.4': None |
| 183 | }, |
| 184 | { |
| 185 | 'v1.2.5': None |
| 186 | }, |
| 187 | { |
| 188 | 'v1.3.9': None |
| 189 | }, |
| 190 | { |
| 191 | 'v1.4.2': None |
| 192 | }, |
| 193 | { |
| 194 | 'v1.6.6': None |
| 195 | }, |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 196 | #{'v1.7.1': None}, Failing tests |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 197 | ], |
| 198 | 'ruby': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 199 | { |
| 200 | 'v1.0.1': { |
| 201 | 'patch': [ |
| 202 | 'tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile', |
| 203 | 'tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh', |
| 204 | ] |
| 205 | } |
| 206 | }, |
| 207 | { |
| 208 | 'v1.1.4': None |
| 209 | }, |
| 210 | { |
| 211 | 'v1.2.5': None |
| 212 | }, |
| 213 | { |
| 214 | 'v1.3.9': None |
| 215 | }, |
| 216 | { |
| 217 | 'v1.4.2': None |
| 218 | }, |
| 219 | { |
| 220 | 'v1.6.6': None |
| 221 | }, |
| 222 | { |
| 223 | 'v1.7.2': None |
| 224 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 225 | { |
| 226 | 'v1.8.0': None |
| 227 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame^] | 228 | { |
| 229 | 'v1.9.1': None |
| 230 | }, |
Adele Zhou | 1487c9f | 2017-10-26 17:59:18 -0700 | [diff] [blame] | 231 | ], |
Adele Zhou | 9fe79dc | 2017-11-02 14:08:29 -0700 | [diff] [blame] | 232 | 'php': [ |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 233 | { |
| 234 | 'v1.0.1': None |
| 235 | }, |
| 236 | { |
| 237 | 'v1.1.4': None |
| 238 | }, |
| 239 | { |
| 240 | 'v1.2.5': None |
| 241 | }, |
| 242 | { |
| 243 | 'v1.3.9': None |
| 244 | }, |
| 245 | { |
| 246 | 'v1.4.2': None |
| 247 | }, |
| 248 | { |
| 249 | 'v1.6.6': None |
| 250 | }, |
| 251 | { |
| 252 | 'v1.7.2': None |
| 253 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 254 | { |
| 255 | 'v1.8.0': None |
| 256 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame^] | 257 | { |
| 258 | 'v1.9.1': None |
| 259 | }, |
Adele Zhou | 9fe79dc | 2017-11-02 14:08:29 -0700 | [diff] [blame] | 260 | ], |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 261 | 'csharp': [ |
Alex Polcyn | 8426329 | 2017-11-15 00:32:50 +0000 | [diff] [blame] | 262 | #{'v1.0.1': None}, |
ncteisen | e4bef08 | 2017-12-11 16:51:34 -0800 | [diff] [blame] | 263 | { |
| 264 | 'v1.1.4': None |
| 265 | }, |
| 266 | { |
| 267 | 'v1.2.5': None |
| 268 | }, |
| 269 | { |
| 270 | 'v1.3.9': None |
| 271 | }, |
| 272 | { |
| 273 | 'v1.4.2': None |
| 274 | }, |
| 275 | { |
| 276 | 'v1.6.6': None |
| 277 | }, |
| 278 | { |
| 279 | 'v1.7.2': None |
| 280 | }, |
Mehrdad Afshari | a3cd72b | 2017-12-12 19:06:53 -0800 | [diff] [blame] | 281 | { |
| 282 | 'v1.8.0': None |
| 283 | }, |
Mehrdad Afshari | 2de1195 | 2018-02-12 13:08:16 -0800 | [diff] [blame^] | 284 | { |
| 285 | 'v1.9.1': None |
| 286 | }, |
Adele Zhou | f7f38d1 | 2017-11-02 17:57:54 -0700 | [diff] [blame] | 287 | ], |
Yong Ni | b2e4bfa | 2017-05-09 18:12:10 -0700 | [diff] [blame] | 288 | } |