kunit: prow presubmit: potentially unbreak WORKSPACE file
* package_mananger.bzl was deleted and we're pulling from the distroless
master branch instead of a fixed SHA1.
* fix distroless to an old commit that seems to work instead of pulling
from master every time.
* upgrade version of io_bazel_rules_docker setup since it is broken at
earlier versions by an @bazel_tools change.
Add in new stuff per https://github.com/bazelbuild/rules_docker/#setup
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Change-Id: I99c392097c3c2f7786eb13ee473b2fc44f2b834c
diff --git a/WORKSPACE b/WORKSPACE
index 743fcf3..fd83a37 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -10,18 +10,25 @@
# import container build/push rules
http_archive(
name = "io_bazel_rules_docker",
- sha256 = "3556d4972571f288f8c43378295d84ed64fef5b1a875211ee1046f9f6b4258fa",
- strip_prefix = "rules_docker-0.8.0",
- urls = ["https://github.com/bazelbuild/rules_docker/archive/v0.8.0.tar.gz"],
+ 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",
- url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.1/rules_pkg-0.2.1.tar.gz",
- sha256 = "04c1eab736f508e94c297455915b6371432cbc4106765b5252b444d1656db051",
+ 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
@@ -59,6 +66,14 @@
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",
@@ -74,7 +89,7 @@
# rules for installing packages from debian snapshot
git_repository(
name = "distroless",
- branch = "master",
+ commit = "c9115ffeeeae0a89ba0c9531b27fdc661add9445",
remote = "https://github.com/GoogleContainerTools/distroless",
)
@@ -82,11 +97,10 @@
"@distroless//package_manager:package_manager.bzl",
"package_manager_repositories",
)
-
load(
"@distroless//package_manager:dpkg.bzl",
- "dpkg_src",
"dpkg_list",
+ "dpkg_src",
)
package_manager_repositories()