From 0752971f8a0c79366802f09837dcd8bca41b88ea Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Fri, 18 Jan 2019 01:24:38 +0100 Subject: [PATCH] tools: add calicoctl --- WORKSPACE | 16 ++++++++++++++-- tools/BUILD | 6 ++++++ tools/install.sh | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 67e876dc..9c40ed22 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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", +) diff --git a/tools/BUILD b/tools/BUILD index ffdd4082..165da430 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -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"], +) diff --git a/tools/install.sh b/tools/install.sh index c16e14ac..dedcfe62 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -9,4 +9,4 @@ cd "${hscloud_root}" bazel build \ //tools:kubectl //tools:kubecfg //tools:clustercfg //tools:secretstore \ - //tools:pass + //tools:pass //tools:calicoctl