github.com/yrj2011/jx-test-infra@v0.0.0-20190529031832-7a2065ee98eb/WORKSPACE (about)

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