summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/BUILD
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-17 15:01:28 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-17 15:02:20 -0800
commitfe92fb36acf0f325cb34e563839c4e7721af77b8 (patch)
tree886369a8349be172c08cd797b1981da271af66f7 /benchmarks/BUILD
parent5cc0bbbafb2dc7d248bc3141b4cfa022d420abd1 (diff)
Add flag to run without building baked images.
Adds flag to :benchmarks to allow running without building "baked images", which depends on gcloud. Users can skip gcloud workflows using the following: blaze run --define gcloud=off :benchmarks -- my-command-without-gcloud "run-gcp" will not work with the flag set, but all other commands will. PiperOrigin-RevId: 295627718
Diffstat (limited to 'benchmarks/BUILD')
-rw-r--r--benchmarks/BUILD18
1 files changed, 14 insertions, 4 deletions
diff --git a/benchmarks/BUILD b/benchmarks/BUILD
index 43614cf5d..2a2d15d7e 100644
--- a/benchmarks/BUILD
+++ b/benchmarks/BUILD
@@ -1,12 +1,22 @@
package(licenses = ["notice"])
+config_setting(
+ name = "gcloud_rule",
+ values = {
+ "define": "gcloud=off",
+ },
+)
+
py_binary(
name = "benchmarks",
srcs = ["run.py"],
- data = [
- "//tools/images:ubuntu1604",
- "//tools/images:zone",
- ],
+ data = select({
+ ":gcloud_rule": [],
+ "//conditions:default": [
+ "//tools/images:ubuntu1604",
+ "//tools/images:zone",
+ ],
+ }),
main = "run.py",
python_version = "PY3",
srcs_version = "PY3",