tools: add calicoctl

This commit is contained in:
q3k 2019-01-18 01:24:38 +01:00
parent 74d278384e
commit 0752971f8a
3 changed files with 21 additions and 3 deletions

View file

@ -13,16 +13,18 @@ git_repository(
load("@io_bazel_rules_python//python:pip.bzl", "pip_import")
pip_import(
name = "py_deps",
requirements = "//:requirements.txt",
name = "py_deps",
requirements = "//:requirements.txt",
)
load("@py_deps//:requirements.bzl", "pip_install")
pip_install()
# Go rules
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.5/rules_go-0.16.5.tar.gz",
@ -69,3 +71,13 @@ go_repository(
commit = "59bc7dedf70e7496a2837207d8723f98f0e5f8e8",
importpath = "github.com/ksonnet/kubecfg",
)
go_repository(
name = "com_github_projectcalico_calicoctl",
importpath = "github.com/projectcalico/calicoctl",
# This fork implements explicit Bazel rules
remote = "https://github.com/q3k/calicoctl",
vcs = "git",
commit = "1bc31862f07e7539ca493de9137ed1ad56cc9f43",
build_file_generation = "off",
)

View file

@ -38,3 +38,9 @@ copy_go_binary(
src = "@com_github_ksonnet_kubecfg//:kubecfg",
visibility = ["//visibility:public"],
)
copy_go_binary(
name = "calicoctl",
src = "@com_github_projectcalico_calicoctl//calicoctl:calicoctl",
visibility = ["//visibility:public"],
)

View file

@ -9,4 +9,4 @@ cd "${hscloud_root}"
bazel build \
//tools:kubectl //tools:kubecfg //tools:clustercfg //tools:secretstore \
//tools:pass
//tools:pass //tools:calicoctl