forked from GoogleContainerTools/container-structure-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
59 lines (50 loc) · 1.97 KB
/
Copy pathMODULE.bazel
File metadata and controls
59 lines (50 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"Bazel module definition, see https://bazel.build/external/overview#bzlmod"
module(
name = "container_structure_test",
# Replaced dynamically when published
version = "0.0.0",
compatibility_level = 1,
)
# To run jq
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.0.0")
ext = use_extension("//:repositories.bzl", "extension")
use_repo(
ext,
"structure_test_toolchains",
# For testing only
"structure_test_st_darwin_amd64",
"structure_test_st_darwin_arm64",
"structure_test_st_linux_amd64",
"structure_test_st_linux_arm64",
"structure_test_st_linux_s390x",
"structure_test_st_windows_amd64",
)
register_toolchains("@structure_test_toolchains//:all")
# 0.5.4 is the first version with bzlmod support
bazel_dep(name = "stardoc", version = "0.7.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
bazel_dep(name = "rules_go", version = "0.61.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.51.3")
# go-dockerclient v1.13.2 declares `go 1.25.5`; pin the SDK so bazel's go_deps
# fetch/build satisfies that directive (rules_go 0.61.1 otherwise defaults to
# go 1.25.0, which fails with "requires go >= 1.25.5").
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.25.5")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps", isolate = True)
go_deps.from_file(go_mod = "//:go.mod")
# All *direct* Go dependencies of the module have to be listed explicitly.
use_repo(
go_deps,
"com_github_fsouza_go_dockerclient",
"com_github_google_go_cmp",
"com_github_google_go_containerregistry",
"com_github_joho_godotenv",
"com_github_moby_sys_sequential",
"com_github_opencontainers_image_spec",
"com_github_pkg_errors",
"com_github_sirupsen_logrus",
"com_github_spf13_cobra",
"in_gopkg_yaml_v2",
"org_golang_x_crypto",
)