github.com/munnerz/test-infra@v0.0.0-20190108210205-ce3d181dc989/WORKSPACE (about) 1 workspace(name = "test_infra") 2 3 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") 4 load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") 5 6 git_repository( 7 name = "bazel_skylib", 8 remote = "https://github.com/bazelbuild/bazel-skylib.git", 9 tag = "0.5.0", 10 ) 11 12 load("@bazel_skylib//:lib.bzl", "versions") 13 14 versions.check(minimum_bazel_version = "0.18.0") 15 16 http_archive( 17 name = "io_bazel_rules_go", 18 sha256 = "7be7dc01f1e0afdba6c8eb2b43d2fa01c743be1b9273ab1eaf6c233df078d705", 19 urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.16.5/rules_go-0.16.5.tar.gz"], 20 ) 21 22 load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies") 23 24 go_rules_dependencies() 25 26 go_register_toolchains(go_version = "1.11.4") 27 28 http_archive( 29 name = "io_bazel_rules_docker", 30 sha256 = "5235045774d2f40f37331636378f21fe11f69906c0386a790c5987a09211c3c4", 31 strip_prefix = "rules_docker-8010a50ef03d1e13f1bebabfc625478da075fa60", 32 urls = ["https://github.com/bazelbuild/rules_docker/archive/8010a50ef03d1e13f1bebabfc625478da075fa60.tar.gz"], 33 ) 34 35 load( 36 "@io_bazel_rules_docker//go:image.bzl", 37 _go_repositories = "repositories", 38 ) 39 40 _go_repositories() 41 42 load("@io_bazel_rules_docker//docker:docker.bzl", "docker_pull", "docker_repositories") 43 44 docker_repositories() 45 46 docker_pull( 47 name = "distroless-base", 48 digest = "sha256:472206d4c501691d9e72cafca4362f2adbc610fecff3dfa42e5b345f9b7d05e5", # 2018/10/25 49 registry = "gcr.io", 50 repository = "distroless/base", 51 tag = "latest", 52 ) 53 54 docker_pull( 55 name = "alpine-base", 56 digest = "sha256:bd327018b3effc802514b63cc90102bfcd92765f4486fc5abc28abf7eb9f1e4d", # 2018/09/20 57 registry = "gcr.io", 58 repository = "k8s-prow/alpine", 59 tag = "0.1", 60 ) 61 62 docker_pull( 63 name = "gcloud-base", 64 digest = "sha256:1dbdee42a553dd6a652d64df1902015ba36ef12d6c16df568a59843e410e270b", # 2018/10/25 65 registry = "gcr.io", 66 repository = "cloud-builders/gcloud", 67 tag = "latest", 68 ) 69 70 docker_pull( 71 name = "git-base", 72 digest = "sha256:01b0f83fe91b782ec7ddf1e742ab7cc9a2261894fd9ab0760ebfd39af2d6ab28", # 2018/07/02 73 registry = "gcr.io", 74 repository = "k8s-prow/git", 75 tag = "0.2", 76 ) 77 78 docker_pull( 79 name = "python", 80 digest = "sha256:0888426cc407c5ce9f2d656d776757f8fdb31795e01f60df38a5bacb697a0db0", # 2018/10/25 81 registry = "index.docker.io", 82 repository = "library/python", 83 tag = "2", 84 ) 85 86 git_repository( 87 name = "io_bazel_rules_k8s", 88 commit = "9d2f6e8e21f1b5e58e721fc29b806957d9931930", 89 remote = "https://github.com/bazelbuild/rules_k8s.git", 90 ) 91 92 git_repository( 93 name = "io_kubernetes_build", 94 commit = "4ce715fbe67d8fbed05ec2bb47a148e754100a4b", 95 remote = "https://github.com/kubernetes/repo-infra.git", 96 ) 97 98 git_repository( 99 name = "build_bazel_rules_nodejs", 100 remote = "https://github.com/bazelbuild/rules_nodejs.git", 101 tag = "0.14.0", 102 ) 103 104 load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install") 105 106 node_repositories(package_json = ["//:package.json"]) 107 108 yarn_install( 109 name = "npm", 110 package_json = "//:package.json", 111 yarn_lock = "//:yarn.lock", 112 ) 113 114 http_archive( 115 name = "build_bazel_rules_typescript", 116 strip_prefix = "rules_typescript-0.18.0", 117 url = "https://github.com/bazelbuild/rules_typescript/archive/0.18.0.zip", 118 ) 119 120 # Fetch our Bazel dependencies that aren't distributed on npm 121 load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies") 122 123 rules_typescript_dependencies() 124 125 # Setup TypeScript toolchain 126 load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") 127 load("//def:test_infra.bzl", "http_archive_with_pkg_path") 128 129 http_archive_with_pkg_path( 130 name = "ruamel_yaml", 131 build_file_content = """ 132 py_library( 133 name = "ruamel.yaml", 134 srcs = glob(["*.py"]), 135 visibility = ["//visibility:public"], 136 ) 137 """, 138 pkg_path = "ruamel/yaml", 139 sha256 = "350496f6fdd8c2bb17a0fa3fd2ec98431280cf12d72dae498b19ac0119c2bbad", 140 strip_prefix = "ruamel.yaml-0.15.9", 141 url = "https://files.pythonhosted.org/packages/83/90/2eecde4bbd6a67805080091e83a29100c2f7d2afcaf926d75da5839f9283/ruamel.yaml-0.15.9.tar.gz", 142 ) 143 144 # http_archives can be updated to newer version by doing the following: 145 # 1) replace the source url with the new source url. 146 # -to find the newest version of a python module, search https://files.pythonhosted.org/ for the package. Use the target url of the download link found at the bottom of the page. 147 # 2) replace the sha256 value with the sha256 sum of the updated package. 148 # -pypi uses md5 sums not sha256 so run `md5sum xxxx.tar.gz` on the downloaded package and validate that it matches the md5sum on pypi 149 # -once the package has been validated, determine the corresponding sha256 by running `sha256sum xxxx.tar.gz`. 150 # 3) ensure that the strip_prefix still prefixes the package directory contents to the level of the src code. 151 152 http_archive( 153 name = "requests", 154 build_file_content = """ 155 py_library( 156 name = "requests", 157 srcs = glob(["**/*.py"]), 158 visibility = ["//visibility:public"], 159 ) 160 """, 161 sha256 = "5722cd09762faa01276230270ff16af7acf7c5c45d623868d9ba116f15791ce8", 162 strip_prefix = "requests-2.13.0/requests", 163 urls = ["https://files.pythonhosted.org/packages/16/09/37b69de7c924d318e51ece1c4ceb679bf93be9d05973bb30c35babd596e2/requests-2.13.0.tar.gz"], 164 ) 165 166 http_archive( 167 name = "yaml", 168 build_file_content = """ 169 py_library( 170 name = "yaml", 171 srcs = glob(["*.py"]), 172 visibility = ["//visibility:public"], 173 ) 174 """, 175 sha256 = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab", 176 strip_prefix = "PyYAML-3.12/lib/yaml", 177 urls = ["https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz"], 178 ) 179 180 http_archive( 181 name = "markupsafe", 182 build_file_content = """ 183 py_library( 184 name = "markupsafe", 185 srcs = glob(["*.py"]), 186 visibility = ["//visibility:public"], 187 ) 188 """, 189 sha256 = "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665", 190 strip_prefix = "MarkupSafe-1.0/markupsafe", 191 urls = ["https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz"], 192 ) 193 194 http_archive( 195 name = "jinja2", 196 build_file_content = """ 197 py_library( 198 name = "jinja2", 199 srcs = glob(["*.py"]), 200 deps = [ 201 "@markupsafe//:markupsafe", 202 ], 203 visibility = ["//visibility:public"], 204 ) 205 """, 206 sha256 = "702a24d992f856fa8d5a7a36db6128198d0c21e1da34448ca236c42e92384825", 207 strip_prefix = "Jinja2-2.9.5/jinja2", 208 urls = ["https://files.pythonhosted.org/packages/71/59/d7423bd5e7ddaf3a1ce299ab4490e9044e8dfd195420fc83a24de9e60726/Jinja2-2.9.5.tar.gz"], 209 ) 210 211 http_file( 212 name = "jq_linux", 213 executable = 1, 214 sha256 = "c6b3a7d7d3e7b70c6f51b706a3b90bd01833846c54d32ca32f0027f00226ff6d", 215 urls = ["https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64"], 216 ) 217 218 http_file( 219 name = "jq_osx", 220 executable = 1, 221 sha256 = "386e92c982a56fe4851468d7a931dfca29560cee306a0e66c6a1bd4065d3dac5", 222 urls = ["https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64"], 223 ) 224 225 http_archive( 226 name = "astroid_lib", 227 build_file_content = """ 228 py_library( 229 name = "astroid_lib", 230 srcs = glob(["**/*.py"]), 231 deps = [ 232 "@six_lib//:six", 233 "@wrapt//:wrapt", 234 "@enum34//:enum34", 235 "@lazy_object_proxy//:lazy_object_proxy", 236 "@singledispatch_lib//:singledispatch_lib", 237 "@backports//:backports", 238 ], 239 visibility = ["//visibility:public"], 240 imports = ["astroid"], 241 ) 242 """, 243 sha256 = "492c2a2044adbf6a84a671b7522e9295ad2f6a7c781b899014308db25312dd35", 244 strip_prefix = "astroid-1.5.3", 245 urls = ["https://files.pythonhosted.org/packages/d7/b7/112288f75293d6f12b1e41bac1e822fd0f29b0f88e2c4378cdd295b9d838/astroid-1.5.3.tar.gz"], 246 ) 247 248 http_archive( 249 name = "isort", 250 build_file_content = """ 251 py_library( 252 name = "isort", 253 srcs = glob(["**/*.py"]), 254 visibility = ["//visibility:public"], 255 ) 256 """, 257 sha256 = "79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983", 258 strip_prefix = "isort-4.2.15/isort", 259 urls = ["https://files.pythonhosted.org/packages/4d/d5/7c8657126a43bcd3b0173e880407f48be4ac91b4957b51303eab744824cf/isort-4.2.15.tar.gz"], 260 ) 261 262 http_archive( 263 name = "lazy_object_proxy", 264 build_file_content = """ 265 py_library( 266 name = "lazy_object_proxy", 267 srcs = glob(["**/*.py"]), 268 visibility = ["//visibility:public"], 269 ) 270 """, 271 sha256 = "eb91be369f945f10d3a49f5f9be8b3d0b93a4c2be8f8a5b83b0571b8123e0a7a", 272 strip_prefix = "lazy-object-proxy-1.3.1/src/lazy_object_proxy", 273 urls = ["https://files.pythonhosted.org/packages/55/08/23c0753599bdec1aec273e322f277c4e875150325f565017f6280549f554/lazy-object-proxy-1.3.1.tar.gz"], 274 ) 275 276 http_archive( 277 name = "mccabe", 278 build_file_content = """ 279 py_library( 280 name = "mccabe", 281 srcs = glob(["**/*.py"]), 282 visibility = ["//visibility:public"], 283 ) 284 """, 285 sha256 = "dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f", 286 strip_prefix = "mccabe-0.6.1", 287 urls = ["https://files.pythonhosted.org/packages/06/18/fa675aa501e11d6d6ca0ae73a101b2f3571a565e0f7d38e062eec18a91ee/mccabe-0.6.1.tar.gz"], 288 ) 289 290 http_archive( 291 name = "pylint", 292 build_file_content = """ 293 py_library( 294 name = "pylint", 295 srcs = glob(["**/*.py"]), 296 deps = [ 297 "@astroid_lib//:astroid_lib", 298 "@six_lib//:six", 299 "@isort//:isort", 300 "@mccabe//:mccabe", 301 "@configparser_lib//:configparser_lib", 302 ], 303 visibility = ["//visibility:public"], 304 ) 305 """, 306 sha256 = "8b4a7ab6cf5062e40e2763c0b4a596020abada1d7304e369578b522e46a6264a", 307 strip_prefix = "pylint-1.7.1/pylint", 308 urls = [ 309 "https://files.pythonhosted.org/packages/cc/8c/d1da590769213fefedea4b345e90fce80f749c61ab9f9187b3fe19397b4b/pylint-1.7.1.tar.gz", 310 ], 311 ) 312 313 http_archive( 314 name = "six_lib", 315 build_file_content = """ 316 py_library( 317 name = "six", 318 srcs = glob(["**/*.py"]), 319 visibility = ["//visibility:public"], 320 ) 321 """, 322 sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", 323 strip_prefix = "six-1.10.0", 324 urls = ["https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"], 325 ) 326 327 http_archive( 328 name = "wrapt", 329 build_file_content = """ 330 py_library( 331 name = "wrapt", 332 srcs = glob(["**/*.py"]), 333 visibility = ["//visibility:public"], 334 ) 335 """, 336 sha256 = "42160c91b77f1bc64a955890038e02f2f72986c01d462d53cb6cb039b995cdd9", 337 strip_prefix = "wrapt-1.10.10/src/wrapt", 338 urls = ["https://files.pythonhosted.org/packages/a3/bb/525e9de0a220060394f4aa34fdf6200853581803d92714ae41fc3556e7d7/wrapt-1.10.10.tar.gz"], 339 ) 340 341 http_archive( 342 name = "enum34", 343 build_file_content = """ 344 py_library( 345 name = "enum34", 346 srcs = glob(["**/*.py"]), 347 visibility = ["//visibility:public"], 348 ) 349 """, 350 sha256 = "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1", 351 strip_prefix = "enum34-1.1.6", 352 urls = ["https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"], 353 ) 354 355 http_archive( 356 name = "singledispatch_lib", 357 build_file_content = """ 358 py_library( 359 name = "singledispatch_lib", 360 srcs = glob(["**/*.py"]), 361 deps = [ 362 "@six_lib//:six", 363 ], 364 visibility = ["//visibility:public"], 365 ) 366 """, 367 sha256 = "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c", 368 strip_prefix = "singledispatch-3.4.0.3", 369 urls = ["https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz"], 370 ) 371 372 http_archive( 373 name = "backports", 374 build_file_content = """ 375 py_library( 376 name = "backports", 377 srcs = glob(["**/*.py"]), 378 visibility = ["//visibility:public"], 379 ) 380 """, 381 sha256 = "31f235852f88edc1558d428d890663c49eb4514ffec9f3650e7f3c9e4a12e36f", 382 strip_prefix = "backports.functools_lru_cache-1.4/backports", 383 urls = ["https://files.pythonhosted.org/packages/4e/91/0e93d9455254b7b630fb3ebe30cc57cab518660c5fad6a08aac7908a4431/backports.functools_lru_cache-1.4.tar.gz"], 384 ) 385 386 http_archive( 387 name = "configparser_lib", 388 build_file_content = """ 389 py_library( 390 name = "configparser_lib", 391 srcs = glob(["**/*.py"]), 392 visibility = ["//visibility:public"], 393 imports = ["backports"], 394 ) 395 """, 396 sha256 = "5308b47021bc2340965c371f0f058cc6971a04502638d4244225c49d80db273a", 397 strip_prefix = "configparser-3.5.0/src", 398 urls = ["https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz"], 399 ) 400 401 # find the most recent version of influxdb at https://pypi.python.org/pypi/influxdb/ 402 http_archive( 403 name = "influxdb", 404 build_file_content = """ 405 py_library( 406 name = "influxdb", 407 srcs = glob(["**/*.py"]), 408 visibility = ["//visibility:public"], 409 ) 410 """, 411 sha256 = "e3790474fa6d3e39043471a2a79b3309e9a47c63c0803a8810241bc8ce056b18", 412 strip_prefix = "influxdb-4.1.1/influxdb", 413 urls = ["https://files.pythonhosted.org/packages/e1/af/94faea244de2a73b7a0087637660db2d638edaae58f22d3f0d0d219ad8b7/influxdb-4.1.1.tar.gz"], 414 ) 415 416 # find the most recent version at https://pypi.python.org/pypi/pytz 417 http_archive( 418 name = "pytz", 419 build_file_content = """ 420 py_library( 421 name = "pytz", 422 srcs = glob(["**/*.py"]), 423 visibility = ["//visibility:public"], 424 ) 425 """, 426 sha256 = "f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589", 427 strip_prefix = "pytz-2017.2/pytz", 428 urls = ["https://files.pythonhosted.org/packages/a4/09/c47e57fc9c7062b4e83b075d418800d322caa87ec0ac21e6308bd3a2d519/pytz-2017.2.zip"], 429 ) 430 431 # find the most recent version at https://pypi.python.org/pypi/python-dateutil 432 http_archive( 433 name = "dateutil", 434 build_file_content = """ 435 py_library( 436 name = "dateutil", 437 srcs = glob(["**/*.py"]), 438 deps = [ 439 "@six_lib//:six", 440 ], 441 visibility = ["//visibility:public"], 442 ) 443 """, 444 sha256 = "891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca", 445 strip_prefix = "python-dateutil-2.6.1/dateutil", 446 urls = ["https://files.pythonhosted.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/python-dateutil-2.6.1.tar.gz"], 447 ) 448 449 # TODO(fejta): get this to work 450 git_repository( 451 name = "io_bazel_rules_appengine", 452 commit = "14d860985c2a764fdb6a6072d5450d8360c4ce5b", 453 remote = "https://github.com/bazelbuild/rules_appengine.git", 454 #tag = "0.0.5", # Latest at https://github.com/bazelbuild/rules_appengine/releases. 455 ) 456 457 load("@io_bazel_rules_appengine//appengine:py_appengine.bzl", "py_appengine_repositories") 458 459 py_appengine_repositories() 460 461 git_repository( 462 name = "io_bazel_rules_python", 463 commit = "f414af5ed85e451908b3fb873211e8f2939ea4e8", 464 remote = "https://github.com/bazelbuild/rules_python.git", 465 ) 466 467 # Only needed for PIP support: 468 load("@io_bazel_rules_python//python:pip.bzl", "pip_import") 469 470 pip_import( 471 name = "kettle_deps", 472 requirements = "//kettle:requirements.txt", 473 ) 474 475 load("@kettle_deps//:requirements.bzl", "pip_install") 476 477 pip_install()