Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,32 @@ bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.14.0") # TODO(alexeagle): remove
bazel_dep(name = "rules_java", version = "8.8.0")
bazel_dep(name = "rules_shell", version = "0.4.1")
bazel_dep(name = "tar.bzl", version = "0.6.0")
bazel_dep(name = "yq.bzl", version = "0.3.1")

bazel_lib_toolchains = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")

tar_toolchains = use_extension("@tar.bzl//tar:extensions.bzl", "toolchains")

yq_toolchains = use_extension("@yq.bzl//yq:extensions.bzl", "yq")

use_repo(bazel_lib_toolchains, "zstd_toolchains")
use_repo(bazel_lib_toolchains, "bsd_tar_toolchains")
use_repo(bazel_lib_toolchains, "yq_darwin_amd64")
use_repo(bazel_lib_toolchains, "yq_darwin_arm64")
use_repo(bazel_lib_toolchains, "yq_linux_amd64")
use_repo(bazel_lib_toolchains, "yq_linux_arm64")
use_repo(bazel_lib_toolchains, "yq_linux_ppc64le")
use_repo(bazel_lib_toolchains, "yq_linux_s390x")
use_repo(bazel_lib_toolchains, "yq_windows_amd64")

use_repo(tar_toolchains, "bsd_tar_toolchains")

use_repo(yq_toolchains, "yq_darwin_amd64")
use_repo(yq_toolchains, "yq_darwin_arm64")
use_repo(yq_toolchains, "yq_linux_amd64")
use_repo(yq_toolchains, "yq_linux_arm64")
use_repo(yq_toolchains, "yq_linux_ppc64le")
use_repo(yq_toolchains, "yq_linux_s390x")
use_repo(yq_toolchains, "yq_windows_amd64")

# Dev dependencies
bazel_dep(name = "gazelle", version = "0.34.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.0.1", dev_dependency = True)
bazel_dep(name = "jq.bzl", version = "0.4.0", dev_dependency = True)
bazel_dep(name = "rules_oci", version = "2.0.0", dev_dependency = True)
bazel_dep(name = "container_structure_test", version = "1.16.0", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion apt/tests/resolution/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@aspect_bazel_lib//lib:jq.bzl", "jq")
load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains")
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@jq.bzl", "jq")

jq(
name = "pick_libuuid_version",
Expand Down
10 changes: 5 additions & 5 deletions distroless/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ bzl_library(
visibility = ["//distroless:__subpackages__"],
deps = [
"@aspect_bazel_lib//lib:expand_template",
"@aspect_bazel_lib//lib:tar",
"@aspect_bazel_lib//lib:utils",
"@bazel_skylib//rules:write_file",
"@tar.bzl//tar:tar",
],
)

Expand All @@ -49,9 +49,9 @@ bzl_library(
visibility = ["//distroless:__subpackages__"],
deps = [
"@aspect_bazel_lib//lib:expand_template",
"@aspect_bazel_lib//lib:tar",
"@aspect_bazel_lib//lib:utils",
"@bazel_skylib//rules:write_file",
"@tar.bzl//tar:tar",
],
)

Expand All @@ -62,9 +62,9 @@ bzl_library(
deps = [
":util",
"@aspect_bazel_lib//lib:expand_template",
"@aspect_bazel_lib//lib:tar",
"@aspect_bazel_lib//lib:utils",
"@bazel_skylib//rules:write_file",
"@tar.bzl//tar:tar",
],
)

Expand All @@ -82,7 +82,7 @@ bzl_library(
deps = [
":tar",
":util",
"@aspect_bazel_lib//lib:tar",
"@tar.bzl//tar:tar",
],
)

Expand All @@ -101,8 +101,8 @@ bzl_library(
"//distroless:__subpackages__",
],
deps = [
"@aspect_bazel_lib//lib:tar",
"@bazel_skylib//lib:sets",
"@tar.bzl//tar:tar",
],
)

Expand Down
2 changes: 1 addition & 1 deletion distroless/private/group.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"group"

load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@aspect_bazel_lib//lib:utils.bzl", "propagate_common_rule_attributes")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@tar.bzl//tar:tar.bzl", "tar")
load(":tar.bzl", "tar_lib")
load(":util.bzl", "util")

Expand Down
2 changes: 1 addition & 1 deletion distroless/private/home.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"home"

load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@tar.bzl//tar:tar.bzl", "tar")
load(":tar.bzl", "tar_lib")
load(":util.bzl", "util")

Expand Down
2 changes: 1 addition & 1 deletion distroless/private/os_release.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"os release"

load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@aspect_bazel_lib//lib:utils.bzl", "propagate_common_rule_attributes")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@tar.bzl//tar:tar.bzl", "tar")
load(":tar.bzl", "tar_lib")

def os_release(
Expand Down
2 changes: 1 addition & 1 deletion distroless/private/passwd.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"osrelease"

load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@aspect_bazel_lib//lib:utils.bzl", "propagate_common_rule_attributes")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@tar.bzl//tar:tar.bzl", "tar")
load(":tar.bzl", "tar_lib")

# WARNING: the mode `0o644` is important
Expand Down
2 changes: 1 addition & 1 deletion distroless/private/tar.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"mtree helpers"

load("@aspect_bazel_lib//lib:tar.bzl", tar = "tar_lib")
load("@bazel_skylib//lib:sets.bzl", "sets")
load("@tar.bzl//tar:tar.bzl", tar = "tar_lib")

DEFAULT_GID = "0"
DEFAULT_UID = "0"
Expand Down
4 changes: 1 addition & 3 deletions distroless/toolchains.bzl
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
"macro for registering toolchains required"

load("@aspect_bazel_lib//lib:repositories.bzl", "register_expand_template_toolchains", "register_tar_toolchains", "register_yq_toolchains", "register_zstd_toolchains")
load("@aspect_bazel_lib//lib:repositories.bzl", "register_expand_template_toolchains", "register_zstd_toolchains")
load("@rules_java//java:repositories.bzl", "rules_java_toolchains")
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")

def distroless_register_toolchains():
"""Register all toolchains required by distroless."""
register_yq_toolchains()
register_zstd_toolchains()
register_tar_toolchains()
register_expand_template_toolchains()
rules_java_dependencies()
rules_java_toolchains()
1 change: 1 addition & 0 deletions e2e/smoke/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test --test_output=errors
4 changes: 2 additions & 2 deletions e2e/smoke/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ NOTE:
(test_linux_<ARCH> files and the bullseye YAML manifest)
"""

load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
load("@bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
load("@container_structure_test//:defs.bzl", "container_structure_test")
load("@rules_distroless//distroless:defs.bzl", "cacerts", "group", "passwd")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
load("@tar.bzl", "tar")

COMPATIBLE_WITH = select({
"@platforms//cpu:x86_64": ["@platforms//cpu:x86_64"],
Expand Down
3 changes: 2 additions & 1 deletion e2e/smoke/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
bazel_dep(name = "rules_distroless", version = "0.0.0", dev_dependency = True)
bazel_dep(name = "bazel_lib", version = "3.0.0-rc.0", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.10", dev_dependency = True)
bazel_dep(name = "rules_oci", version = "2.0.0", dev_dependency = True)
bazel_dep(name = "container_structure_test", version = "1.16.0", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.7.3", dev_dependency = True)
bazel_dep(name = "tar.bzl", version = "0.6.0", dev_dependency = True)

local_path_override(
module_name = "rules_distroless",
Expand Down
2 changes: 1 addition & 1 deletion examples/debian_snapshot/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ NOTE:
(test_linux_<ARCH> files and the bullseye YAML manifest)
"""

load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
load("@container_structure_test//:defs.bzl", "container_structure_test")
load("@rules_distroless//distroless:defs.bzl", "cacerts", "group", "passwd")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
load("@tar.bzl", "tar")

COMPATIBLE_WITH = select({
"@platforms//cpu:x86_64": ["@platforms//cpu:x86_64"],
Expand Down
2 changes: 1 addition & 1 deletion examples/flatten/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@tar.bzl", "tar")
load("//distroless:defs.bzl", "flatten", "home", "passwd")
load("//distroless/tests:asserts.bzl", "assert_tar_listing", "assert_tar_mtree")

Expand Down
2 changes: 1 addition & 1 deletion examples/ubuntu_snapshot/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@container_structure_test//:defs.bzl", "container_structure_test")
load("@rules_distroless//distroless:defs.bzl", "group", "passwd")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
load("@tar.bzl", "tar")

COMPATIBLE_WITH = select({
"@platforms//cpu:x86_64": ["@platforms//cpu:x86_64"],
Expand Down
Loading