diff --git a/hack/bin/BUILD.bazel b/hack/bin/BUILD.bazel index 0814a6e40..cc2fb7a88 100644 --- a/hack/bin/BUILD.bazel +++ b/hack/bin/BUILD.bazel @@ -17,6 +17,7 @@ genrule( name = "fetch_helm", srcs = select({ ":darwin": ["@helm_darwin//:file"], + ":darwin_arm": ["@helm_darwin_arm//:file"], ":k8": ["@helm_linux//:file"], }), outs = ["helm"], @@ -61,6 +62,7 @@ genrule( name = "fetch_kubectl", srcs = select({ ":darwin": ["@kubectl_1_22_darwin//file"], + ":darwin_arm": ["@kubectl_1_22_darwin_arm//file"], ":k8": ["@kubectl_1_22_linux//file"], }), outs = ["kubectl"], @@ -129,6 +131,7 @@ genrule( name = "fetch_kind", srcs = select({ ":darwin": ["@kind_darwin//file"], + ":darwin_arm": ["@kind_darwin_arm//file"], ":k8": ["@kind_linux//file"], }), outs = ["kind"], @@ -148,6 +151,7 @@ genrule( name = "fetch_ytt", srcs = select({ ":darwin": ["@ytt_darwin//file"], + ":darwin_arm": ["@ytt_darwin_arm//file"], ":k8": ["@ytt_linux//file"], }), outs = ["ytt"], @@ -158,6 +162,7 @@ genrule( name = "fetch_yq", srcs = select({ ":darwin": ["@yq_darwin//file"], + ":darwin_arm": ["@yq_darwin_arm//file"], ":k8": ["@yq_linux//file"], }), outs = ["yq"], @@ -176,6 +181,12 @@ config_setting( visibility = ["//visibility:private"], ) +config_setting( + name = "darwin_arm", + values = {"host_cpu": "darwin_arm64"}, + visibility = ["//visibility:private"], +) + filegroup( name = "package-srcs", srcs = glob(["**"]), diff --git a/hack/bin/deps.bzl b/hack/bin/deps.bzl index 0eb134bd6..2e4c841ca 100644 --- a/hack/bin/deps.bzl +++ b/hack/bin/deps.bzl @@ -151,8 +151,8 @@ def install_bazel_tools(): # Install Helm targets def install_helm(): - ## Fetch helm & tiller for use in template generation and testing - ## You can bump the version of Helm & Tiller used during e2e tests by tweaking + ## Fetch helm for use in template generation and testing + ## You can bump the version of Helm used during e2e tests by tweaking ## the version numbers in these rules. http_archive( name = "helm_darwin", @@ -170,6 +170,22 @@ filegroup( """, ) + http_archive( + name = "helm_darwin_arm", + sha256 = "a50b499dbd0bbec90761d50974bf1e67cc6d503ea20d03b4a1275884065b7e9e", + urls = ["https://get.helm.sh/helm-v3.6.3-darwin-arm64.tar.gz"], + build_file_content = + """ +filegroup( + name = "file", + srcs = [ + "darwin-arm64/helm", + ], + visibility = ["//visibility:public"], +) +""", + ) + http_archive( name = "helm_linux", sha256 = "07c100849925623dc1913209cd1a30f0a9b80a5b4d6ff2153c609d11b043e262", @@ -191,15 +207,22 @@ def install_kubectl(): http_file( name = "kubectl_1_22_darwin", executable = 1, - sha256 = "2b5214a01a9595e4f2b8f30c556136c5b93351f6677d07858ee1acf92cc14249", - urls = ["https://storage.googleapis.com/kubernetes-release/release/v1.22.0/bin/darwin/amd64/kubectl"], + sha256 = "00bb3947ac6ff15690f90ee1a732d0a9a44360fc7743dbfee4cba5a8f6a31413", + urls = ["https://storage.googleapis.com/kubernetes-release/release/v1.22.1/bin/darwin/amd64/kubectl"], + ) + + http_file( + name = "kubectl_1_22_darwin_arm", + executable = 1, + sha256 = "c81a314ab7f0827a5376f8ffd6d47f913df046275d44c562915a822229819d77", + urls = ["https://storage.googleapis.com/kubernetes-release/release/v1.22.1/bin/darwin/arm64/kubectl"], ) http_file( name = "kubectl_1_22_linux", executable = 1, - sha256 = "703e70d49b82271535bc66bc7bd469a58c11d47f188889bd37101c9772f14fa1", - urls = ["https://storage.googleapis.com/kubernetes-release/release/v1.22.0/bin/linux/amd64/kubectl"], + sha256 = "78178a8337fc6c76780f60541fca7199f0f1a2e9c41806bded280a4a5ef665c9", + urls = ["https://storage.googleapis.com/kubernetes-release/release/v1.22.1/bin/linux/amd64/kubectl"], ) @@ -230,6 +253,13 @@ def install_kind(): urls = ["https://github.com/kubernetes-sigs/kind/releases/download/v0.11.1/kind-darwin-amd64"], ) + http_file( + name = "kind_darwin_arm", + executable = 1, + sha256 = "4f019c578600c087908ac59dd0c4ce1791574f153a70608adb372d5abc58cd47", + urls = ["https://github.com/kubernetes-sigs/kind/releases/download/v0.11.1/kind-darwin-arm64"], + ) + http_file( name = "kind_linux", executable = 1, @@ -243,15 +273,22 @@ def install_ytt(): http_file( name = "ytt_darwin", executable = 1, - sha256 = "a874395924e670f2c89160efeffc35b94a9bcf4e515e49935cb1ceb22be7f08a", - urls = ["https://github.com/vmware-tanzu/carvel-ytt/releases/download/v0.34.0/ytt-darwin-amd64"], + sha256 = "9662e3f8e30333726a03f7a5ae6231fbfb2cebb6c1aa3f545b253d7c695487e6", + urls = ["https://github.com/vmware-tanzu/carvel-ytt/releases/download/v0.36.0/ytt-darwin-amd64"], + ) + + http_file( + name = "ytt_darwin_arm", + executable = 1, + sha256 = "c970b2c13d4059f0bee3bf3ceaa09bd0674a62c24550453d90b284d885a06b7b", + urls = ["https://github.com/vmware-tanzu/carvel-ytt/releases/download/v0.36.0/ytt-darwin-arm64"], ) http_file( name = "ytt_linux", executable = 1, - sha256 = "49741ac5540fc64da8566f3d1c9538f4f0fec22c62b8ba83e5e3d8efb91ee170", - urls = ["https://github.com/vmware-tanzu/carvel-ytt/releases/download/v0.34.0/ytt-linux-amd64"], + sha256 = "d81ecf6c47209f6ac527e503a6fd85e999c3c2f8369e972794047bddc7e5fbe2", + urls = ["https://github.com/vmware-tanzu/carvel-ytt/releases/download/v0.36.0/ytt-linux-amd64"], ) # yq is jq for yaml @@ -263,6 +300,13 @@ def install_yq(): urls = ["https://github.com/mikefarah/yq/releases/download/v4.11.2/yq_darwin_amd64"], ) + http_file( + name = "yq_darwin_arm", + executable = 1, + sha256 = "665ae1af7c73866cba74dd878c12ac49c091b66e46c9ed57d168b43955f5dd69", + urls = ["https://github.com/mikefarah/yq/releases/download/v4.12.0/yq_darwin_arm64"], + ) + http_file( name = "yq_linux", executable = 1,