| workspace(name = "prow_presubmit") |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| load( |
| "@bazel_tools//tools/build_defs/repo:git.bzl", |
| "git_repository", |
| "new_git_repository", |
| ) |
| |
| # import container build/push rules |
| http_archive( |
| name = "io_bazel_rules_docker", |
| sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036", |
| strip_prefix = "rules_docker-0.14.4", |
| urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.14.4/rules_docker-v0.14.4.tar.gz"], |
| ) |
| |
| # import bazel rules for pkg_tar and friends. |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| http_archive( |
| name = "rules_pkg", |
| sha256 = "aeca78988341a2ee1ba097641056d168320ecc51372ef7ff8e64b139516a4937", |
| urls = [ |
| "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.6-1/rules_pkg-0.2.6.tar.gz", |
| "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz", |
| ], |
| ) |
| |
| load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") |
| |
| rules_pkg_dependencies() |
| |
| # pull latest kunitconfig |
| new_git_repository( |
| name = "kunitconfig_repo", |
| branch = "kunit/alpha/master", |
| build_file_content = """ |
| exports_files(["kunitconfig"]) |
| """, |
| remote = "https://kunit.googlesource.com/kunitconfig", |
| ) |
| |
| # pull latest kunit source for testing |
| new_git_repository( |
| name = "kunit_repo", |
| branch = "kunit/alpha/master", |
| build_file_content = """ |
| load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") |
| |
| pkg_tar( |
| name = "files", |
| srcs = glob(["**"]), |
| strip_prefix = ".", |
| visibility = ["//visibility:public"], |
| ) |
| """, |
| remote = "https://kunit.googlesource.com/linux", |
| ) |
| |
| # setting container rules / base images needed |
| load( |
| "@io_bazel_rules_docker//repositories:repositories.bzl", |
| container_repositories = "repositories", |
| ) |
| |
| container_repositories() |
| |
| load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps") |
| |
| container_deps() |
| |
| load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps") |
| |
| pip_deps() |
| |
| load( |
| "@io_bazel_rules_docker//container:container.bzl", |
| "container_pull", |
| ) |
| |
| container_pull( |
| name = "debian_base", |
| registry = "index.docker.io", |
| repository = "library/debian", |
| tag = "buster", |
| ) |
| |
| # rules for installing packages from debian snapshot |
| git_repository( |
| name = "distroless", |
| commit = "c9115ffeeeae0a89ba0c9531b27fdc661add9445", |
| remote = "https://github.com/GoogleContainerTools/distroless", |
| ) |
| |
| load( |
| "@distroless//package_manager:package_manager.bzl", |
| "package_manager_repositories", |
| ) |
| load( |
| "@distroless//package_manager:dpkg.bzl", |
| "dpkg_list", |
| "dpkg_src", |
| ) |
| |
| package_manager_repositories() |
| |
| load("//:debs.bzl", "get_dep_list") |
| |
| dpkg_src( |
| name = "uml", |
| arch = "amd64", |
| distro = "buster", |
| sha256 = "d310bbe2c01ff031ed5e65f50d6ce7ffef24717ffbc696a259117e45370c437e", |
| snapshot = "20181221T102052Z", |
| url = "http://snapshot.debian.org/archive", |
| ) |
| |
| dpkg_list( |
| name = "debs", |
| packages = get_dep_list(), |
| sources = [ |
| "@uml//file:Packages.json", |
| ], |
| ) |