This repository was archived by the owner on Mar 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathBUILD.bazel
More file actions
78 lines (68 loc) · 2.31 KB
/
BUILD.bazel
File metadata and controls
78 lines (68 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
load(
"@gapic_generator_python//rules_python_gapic:py_gapic.bzl",
"py_gapic_library",
)
load(
"@gapic_generator_python//rules_python_gapic:py_gapic_pkg.bzl",
"py_gapic_assembly_pkg",
)
load(
"@gapic_generator_python//rules_python_gapic/test:integration_test.bzl",
"golden_update",
"integration_test",
)
load("@rules_proto//proto:defs.bzl", "proto_library")
package(default_visibility = ["//visibility:public"])
####################################################
# Integration Test Rules
#
# Usage:
# Run tests: bazel test tests/integration:asset
# Update goldens: bazel run tests/integration:asset_update
####################################################
INTEGRATION_TEST_LIBRARIES = [
"asset", # Basic case.
"credentials", # Check that the capital name edge case is handled.
"logging", # Java package remapping in gapic.yaml.
"redis", # Has a gapic.yaml.
]
[integration_test(
name = lib_name,
data = ["//tests/integration/goldens/%s:goldens_files" % lib_name],
target = ":%s_py_gapic" % lib_name,
) for lib_name in INTEGRATION_TEST_LIBRARIES]
[golden_update(
name = "%s_update" % lib_name,
data = ["//tests/integration/goldens/%s:goldens_files" % lib_name],
target = ":%s_py_gapic" % lib_name,
) for lib_name in INTEGRATION_TEST_LIBRARIES]
####################################################
# API Library Rules
####################################################
# Asset.
py_gapic_library(
name = "asset_py_gapic",
srcs = ["@com_google_googleapis//google/cloud/asset/v1:asset_proto"],
grpc_service_config = "cloudasset_grpc_service_config.json",
)
# Credentials.
py_gapic_library(
name = "credentials_py_gapic",
srcs = ["@com_google_googleapis//google/iam/credentials/v1:credentials_proto"],
grpc_service_config = "iamcredentials_grpc_service_config.json",
)
# Logging.
py_gapic_library(
name = "logging_py_gapic",
srcs = ["@com_google_googleapis//google/logging/v2:logging_proto"],
grpc_service_config = "logging_grpc_service_config.json",
opt_args = [
"python-gapic-namespace=google.cloud",
"python-gapic-name=logging",
],
)
py_gapic_library(
name = "redis_py_gapic",
srcs = ["@com_google_googleapis//google/cloud/redis/v1:redis_proto"],
grpc_service_config = "redis_grpc_service_config.json",
)