load("//hack/tools/bzl:index.bzl", "platforms", "tool") package(default_visibility = ["//visibility:public"]) # call platforms() to make config_settings for OSX and Linux platforms # available to our `tool` macro platforms() tool( name = "fetch_buildifier", outs = ["buildifier"], darwin = "@buildifier_osx//file", k8 = "@buildifier_linux//file", m1 = "@buildifier_m1//file", tags = ["manual"], ) tool( name = "fetch_buildozer", outs = ["buildozer"], darwin = "@buildozer_osx//file", k8 = "@buildozer_linux//file", m1 = "@buildozer_m1//file", tags = ["manual"], ) tool( name = "fetch_kustomize", outs = ["kustomize"], darwin = "@kustomize_osx//:file", k8 = "@kustomize_linux//:file", m1 = "@kustomize_m1//:file", tags = ["manual"], ) tool( name = "fetch_helm", outs = ["helm"], darwin = "@helm_osx//:file", k8 = "@helm_linux//:file", m1 = "@helm_m1//:file", tags = ["manual"], ) tool( name = "fetch_kpt", outs = ["kpt"], darwin = "@kpt_osx//:file", k8 = "@kpt_linux//:file", m1 = "@kpt_m1//:file", tags = ["manual"], ) tool( name = "fetch_kubebuilder", outs = [ "etcd", "kube-apiserver", "kubectl", ], cmd = "cp $(SRCS) $(RULEDIR)", darwin = "@kubebuilder_tools_osx//:files", k8 = "@kubebuilder_tools_linux//:files", m1 = "@kubebuilder_tools_m1//:files", tags = ["manual"], ) tool( name = "fetch_golangci_lint", outs = [ "golangci-lint", ], darwin = "@golangci_lint_darwin_amd64//:file", k8 = "@golangci_lint_linux//:file", m1 = "@golangci_lint_m1//:file", tags = ["manual"], ) tool( name = "fetch_yq", outs = ["yq"], darwin = "@yq_osx//file", k8 = "@yq_linux//file", m1 = "@yq_m1//file", tags = ["manual"], ) tool( name = "fetch_kind", outs = ["kind"], darwin = "@kind_osx//file", k8 = "@kind_linux//file", m1 = "@kind_m1//file", tags = ["manual"], ) tool( name = "fetch_k3d", outs = ["k3d"], darwin = "@k3d_osx//file", k8 = "@k3d_linux//file", m1 = "@k3d_m1//file", tags = ["manual"], ) tool( name = "fetch_sonobuoy", outs = ["sonobuoy"], darwin = "@sonobuoy_osx//:file", k8 = "@sonobuoy_linux//:file", m1 = "@sonobuoy_m1//:file", tags = ["manual"], ) tool( name = "fetch_argo", outs = ["argo"], darwin = "//hack/tools:gunzip-argo-darwin", k8 = "//hack/tools:gunzip-argo-k8s", m1 = "//hack/tools:gunzip-argo-m1", tags = ["manual"], ) genrule( name = "gunzip-argo-k8s", srcs = ["@argo_linux//file"], outs = ["k8s_argo"], cmd = """ gunzip -f -c $(SRCS) > $(RULEDIR)/k8s_argo """, ) genrule( name = "gunzip-argo-m1", srcs = ["@argo_m1//file"], outs = ["m1_argo"], cmd = """ gunzip -f -c $(SRCS) > $(RULEDIR)/m1_argo """, ) genrule( name = "gunzip-argo-darwin", srcs = ["@argo_osx//file"], outs = ["darwin_argo"], cmd = """ gunzip -f -c $(SRCS) > $(RULEDIR)/darwin_argo """, ) tool( name = "fetch_lua", outs = ["lua"], darwin = "@luajit_osx//:install_luajit_mac", k8 = "@luajit_linux//:install_luajit_linux", m1 = "@luajit_m1//:install_luajit_m1", tags = ["manual"], ) tool( name = "fetch_fluxcd", outs = ["flux"], darwin = "@fluxcd_cli_osx//:file", k8 = "@fluxcd_cli_linux//:file", m1 = "@fluxcd_cli_m1//:file", tags = ["manual"], ) tool( name = "fetch_cloud_sql_proxy", outs = ["cloud_sql_proxy"], darwin = "@cloud_sql_proxy_osx//file", k8 = "@cloud_sql_proxy_linux//file", m1 = "@cloud_sql_proxy_m1//file", tags = ["manual"], ) tool( name = "fetch_kubeval", outs = ["kubeval"], darwin = "@kubeval_osx//:file", k8 = "@kubeval_linux//:file", m1 = "@kubeval_m1//:file", ) tool( name = "fetch_embedded_postgres", outs = ["postgres.txz"], darwin = "@embedded_postgres_osx//:file", k8 = "@embedded_postgres_linux//:file", m1 = "@embedded_postgres_m1//:file", tags = ["manual"], ) tool( name = "fetch_crdoc", outs = ["crdoc"], darwin = "@crdoc_osx//:file", k8 = "@crdoc_linux//:file", m1 = "@crdoc_m1//:file", tags = ["manual"], ) tool( name = "fetch_golang_migrate", outs = ["golang_migrate"], darwin = "@golang_migrate_darwin_amd64//:file", k8 = "@golang_migrate_linux_amd64//:file", m1 = "@golang_migrate_darwin_arm64//:file", tags = ["manual"], ) tool( name = "fetch_target_determinator", outs = ["target-determinator"], darwin = "@target_determinator_darwin//file", k8 = "@target_determinator_linux//file", m1 = "@target_determinator_m1//file", tags = ["manual"], ) tool( name = "fetch_apko", outs = ["apko"], darwin = "@apko_darwin_amd64//:file", k8 = "@apko_linux_amd64//:file", m1 = "@apko_darwin_arm64//:file", tags = ["manual"], ) filegroup( name = "package-srcs", srcs = glob(["**"]), tags = ["automanaged"], visibility = ["//visibility:private"], ) filegroup( name = "all-srcs", srcs = [":package-srcs"], tags = ["automanaged"], visibility = ["//visibility:public"], )