Skip to content

Commit 662bb1a

Browse files
aCombraycopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 894021122
1 parent 81badf7 commit 662bb1a

3 files changed

Lines changed: 287 additions & 64 deletions

File tree

src/devtools/mobileharness/shared/util/comm/dualconduit/dcon.bara.sky

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ dcon_blaze_to_bazel_transforms = [
3838
dcon_build_file_replace("//third_party/golang/grpc/codes", "@org_golang_google_grpc//codes"),
3939
dcon_build_file_replace("//third_party/golang/grpc/reflection", "@org_golang_google_grpc//reflection"),
4040
dcon_build_file_replace("//third_party/golang/grpc/status", "@org_golang_google_grpc//status"),
41+
dcon_build_file_replace("//third_party/golang/grpc/credentials/insecure", "@org_golang_google_grpc//credentials/insecure"),
4142
dcon_build_file_replace("//third_party/golang/grpc", "@org_golang_google_grpc//:grpc"),
4243
dcon_build_file_replace("//third_party/golang/github_com/rsocket/rsocket_go/v/v0/payload", "@com_github_rsocket_rsocket_go//payload"),
4344
dcon_build_file_replace("//third_party/golang/github_com/rsocket/rsocket_go/v/v0/rx/flux", "@com_github_rsocket_rsocket_go//rx/flux"),
@@ -56,6 +57,7 @@ dcon_go_imports_map = {
5657
"google3/third_party/deviceinfra/src/devtools/mobileharness/shared/util/comm/dualconduit/proto/dual_conduit_go_proto": "github.com/google/device-infra/src/devtools/mobileharness/shared/util/comm/dualconduit/proto/dconpb",
5758
"google3/third_party/deviceinfra/src/devtools/mobileharness/shared/util/comm/dualconduit/tests/helloworld/helloworld_service_go_grpc": "github.com/google/device-infra/src/devtools/mobileharness/shared/util/comm/dualconduit/tests/helloworld/proto/helloworldsvcpb",
5859
"google3/third_party/deviceinfra/src/devtools/mobileharness/shared/util/comm/dualconduit/tests/helloworld/helloworld_go_proto": "github.com/google/device-infra/src/devtools/mobileharness/shared/util/comm/dualconduit/tests/helloworld/proto/helloworldpb",
60+
"google3/third_party/golang/grpc/credentials/insecure/insecure": "google.golang.org/grpc/credentials/insecure",
5961
"google3/third_party/golang/grpc/grpc": "google.golang.org/grpc",
6062
"google3/third_party/golang/grpc/reflection/reflection": "google.golang.org/grpc/reflection",
6163
"google3/third_party/golang/grpc/codes/codes": "google.golang.org/grpc/codes",

src/devtools/mobileharness/shared/util/comm/dualconduit/dialer/BUILD

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,31 @@
1313
# limitations under the License.
1414
#
1515

16-
load("@rules_go//go:def.bzl", "go_binary")
17-
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load", "oci_push")
18-
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
16+
load("@rules_go//go:def.bzl", "go_library")
1917

20-
package(default_applicable_licenses = ["//:license"])
18+
package(
19+
default_applicable_licenses = ["//:license"],
20+
default_visibility = [
21+
"//src/devtools/mobileharness/shared/util/comm/dualconduit/cmd/dialer:__pkg__",
22+
"//src/devtools/mobileharness/shared/util/comm/dualconduit/tests:__pkg__",
23+
],
24+
)
2125

22-
go_binary(
26+
go_library(
2327
name = "dialer",
2428
srcs = ["dialer.go"],
25-
goarch = "amd64",
26-
goos = "linux",
27-
pure = "on",
29+
importpath = "github.com/google/device-infra/src/devtools/mobileharness/shared/util/comm/dualconduit/dialer",
2830
deps = [
31+
"//src/devtools/mobileharness/shared/util/comm/dualconduit/conduit",
2932
"//src/devtools/mobileharness/shared/util/comm/dualconduit/proto:dual_conduit_go_proto",
3033
"//src/devtools/mobileharness/shared/util/comm/dualconduit/proto:dual_conduit_service_go_grpc",
31-
"@org_golang_google_grpc//:grpc",
34+
"@com_github_rsocket_rsocket_go//:rsocket-go",
35+
"@com_github_rsocket_rsocket_go//core/transport",
36+
"@com_github_rsocket_rsocket_go//payload",
37+
"@com_github_rsocket_rsocket_go//rx/flux",
38+
"@com_github_google_uuid//:uuid",
3239
"@org_golang_google_grpc//codes",
33-
"@org_golang_google_grpc//reflection",
3440
"@org_golang_google_grpc//status",
41+
"@org_golang_google_protobuf//proto",
3542
],
3643
)
37-
38-
# ==========================================
39-
# Build and push Docker image.
40-
# ==========================================
41-
pkg_tar(
42-
name = "dialer_tar",
43-
srcs = [":dialer"],
44-
package_dir = "/dualconduit",
45-
)
46-
47-
oci_image(
48-
name = "dialer_image",
49-
base = "@distroless_static",
50-
entrypoint = ["/dualconduit/dialer"],
51-
tars = [":dialer_tar"],
52-
)
53-
54-
oci_load(
55-
name = "dialer_load",
56-
image = ":dialer_image",
57-
repo_tags = ["dualconduit/dialer:latest"],
58-
)
59-
60-
oci_push(
61-
name = "dialer_push",
62-
image = ":dialer_image",
63-
remote_tags = ["latest"],
64-
)

0 commit comments

Comments
 (0)