aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/jsonnet/BUILD
diff options
context:
space:
mode:
authorGravatar David Chen <dzc@google.com>2015-09-12 01:32:26 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-09-14 15:39:18 +0000
commit361d2e2f7448038355b337ee4f7191a28c20755a (patch)
tree705fb5e52a6a36300d11cf2c0f451f2b9324ae7b /examples/jsonnet/BUILD
parent2ad1c81755063b72a599844e730e0344344f61e8 (diff)
Add Jsonnet rules to Bazel.
RELNOTES: Add Jsonnet rules to Bazel -- MOS_MIGRATED_REVID=102895524
Diffstat (limited to 'examples/jsonnet/BUILD')
-rw-r--r--examples/jsonnet/BUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/examples/jsonnet/BUILD b/examples/jsonnet/BUILD
new file mode 100644
index 0000000000..3c829df876
--- /dev/null
+++ b/examples/jsonnet/BUILD
@@ -0,0 +1,41 @@
+package(default_visibility = ["//visibility:public"])
+
+load("/tools/build_defs/jsonnet/jsonnet", "jsonnet_library", "jsonnet_to_json")
+
+jsonnet_library(
+ name = "workflow",
+ srcs = ["workflow.jsonnet"],
+)
+
+jsonnet_to_json(
+ name = "wordcount",
+ src = "wordcount.jsonnet",
+ outs = ["wordcount.json"],
+ deps = [":workflow"],
+)
+
+jsonnet_to_json(
+ name = "intersection",
+ src = "intersection.jsonnet",
+ outs = ["intersection.json"],
+ deps = [":workflow"],
+)
+
+jsonnet_library(
+ name = "shell-workflows-lib",
+ srcs = [
+ "intersection.jsonnet",
+ "wordcount.jsonnet",
+ ],
+ deps = [":workflow"],
+)
+
+jsonnet_to_json(
+ name = "shell-workflows",
+ src = "shell-workflows.jsonnet",
+ outs = [
+ "intersection-workflow.json",
+ "wordcount-workflow.json",
+ ],
+ deps = [":shell-workflows-lib"],
+)