github.com/abayer/test-infra@v0.0.5/metrics/BUILD.bazel (about) 1 package(default_visibility = ["//visibility:public"]) 2 3 filegroup( 4 name = "package-srcs", 5 srcs = glob(["**"]), 6 tags = ["automanaged"], 7 visibility = ["//visibility:private"], 8 ) 9 10 filegroup( 11 name = "all-srcs", 12 srcs = [":package-srcs"], 13 tags = ["automanaged"], 14 ) 15 16 config_setting( 17 name = "k8", 18 values = {"host_cpu": "k8"}, 19 visibility = ["//visibility:public"], 20 ) 21 22 config_setting( 23 name = "darwin", 24 values = {"host_cpu": "darwin"}, 25 visibility = ["//visibility:public"], 26 ) 27 28 py_binary( 29 name = "bigquery", 30 srcs = ["bigquery.py"], 31 data = glob(["configs/**"]) + select({ 32 ":darwin": ["@jq_osx//file"], 33 ":k8": ["@jq_linux//file"], 34 }), 35 deps = [ 36 "@dateutil", 37 "@influxdb", 38 "@pytz", 39 "@requests", 40 "@yaml", 41 ], 42 ) 43 44 py_test( 45 name = "bigquery_test", 46 srcs = [ 47 "bigquery.py", 48 "bigquery_test.py", 49 ], 50 args = select({ 51 ":k8": ["--jq=$(location @jq_linux//file)"], 52 ":darwin": ["--jq=$(location @jq_osx//file)"], 53 }), 54 data = glob(["configs/*"]) + ["README.md"] + select({ 55 ":k8": ["@jq_linux//file"], 56 ":darwin": ["@jq_osx//file"], 57 }), 58 deps = [ 59 "@dateutil", 60 "@influxdb", 61 "@pytz", 62 "@requests", 63 "@yaml", 64 ], 65 )