blob: 9c92879ba9a23f03326b70adea39f7750df659f3 [file] [log] [blame]
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 = "29d109605e0d6f9c892584f07275b8c9260803bf0c6fcb7de2623b2bedc910bd",
strip_prefix = "rules_docker-0.5.1",
urls = ["https://github.com/bazelbuild/rules_docker/archive/v0.5.1.tar.gz"],
)
# 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//container:container.bzl",
"container_pull",
container_repositories = "repositories",
)
container_repositories()
container_pull(
name = "debian_base",
registry = "index.docker.io",
repository = "library/debian",
)
# rules for installing packages from debian snapshot
git_repository(
name = "distroless",
branch = "master",
remote = "https://github.com/GoogleContainerTools/distroless",
)
load(
"@distroless//package_manager:package_manager.bzl",
"package_manager_repositories",
"dpkg_src",
"dpkg_list",
)
package_manager_repositories()
load("//:debs.bzl", "get_dep_list")
dpkg_src(
name = "uml",
arch = "amd64",
distro = "stretch",
sha256 = "a0c5a8906ac6ad010535cca152df43411d0e5db1790f6d0e4106bbdf96f3ef0f",
snapshot = "20181121T102052Z",
url = "http://snapshot.debian.org/archive",
)
dpkg_list(
name = "debs",
packages = get_dep_list(),
sources = [
"@uml//file:Packages.json",
],
)