Skip to content

Commit 9159250

Browse files
Google APIscopybara-github
authored andcommitted
chore: migrate devtools/build to the PHP microgenerator
Committer: @miraleung PiperOrigin-RevId: 366152684
1 parent 95dd249 commit 9159250

5 files changed

Lines changed: 23 additions & 39 deletions

File tree

google/devtools/build/v1/BUILD.bazel

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,14 @@ py_gapic_assembly_pkg(
175175

176176
##############################################################################
177177
# PHP
178+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
178179
##############################################################################
179180
load(
180181
"@com_google_googleapis_imports//:imports.bzl",
181-
"php_gapic_assembly_pkg",
182-
"php_gapic_library",
183-
"php_grpc_library",
184-
"php_proto_library",
182+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
183+
php_gapic_library = "php_gapic_library2",
184+
php_grpc_library = "php_grpc_library2",
185+
php_proto_library = "php_proto_library2",
185186
)
186187

187188
php_proto_library(
@@ -197,11 +198,8 @@ php_grpc_library(
197198

198199
php_gapic_library(
199200
name = "build_php_gapic",
200-
src = ":build_proto_with_info",
201-
gapic_yaml = "buildeventservice_gapic.yaml",
201+
srcs = [":build_proto_with_info"],
202202
grpc_service_config = "buildeventservice_grpc_service_config.json",
203-
package = "google.devtools.build.v1",
204-
service_yaml = "buildeventservice_v1.yaml",
205203
deps = [
206204
":build_php_grpc",
207205
":build_php_proto",

google/devtools/build/v1/build_events.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;bui
2525
option java_multiple_files = true;
2626
option java_outer_classname = "BuildEventProto";
2727
option java_package = "com.google.devtools.build.v1";
28+
option php_namespace = "Google\\Cloud\\Build\\V1";
2829

2930
// An event representing some state change that occurred in the build. This
3031
// message does not include field for uniquely identifying an event.

google/devtools/build/v1/build_status.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;bui
2424
option java_multiple_files = true;
2525
option java_outer_classname = "BuildStatusProto";
2626
option java_package = "com.google.devtools.build.v1";
27+
option php_namespace = "Google\\Cloud\\Build\\V1";
2728

2829
// Status used for both invocation attempt and overall build completion.
2930
message BuildStatus {

google/devtools/build/v1/buildeventservice_gapic.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,3 @@ config_schema_version: 2.0.0
44
language_settings:
55
java:
66
package_name: com.google.cloud.devtools.build.v1
7-
python:
8-
package_name: google.cloud.devtools.build_v1.gapic
9-
go:
10-
package_name: cloud.google.com/go/devtools/build/apiv1
11-
csharp:
12-
package_name: Google.Devtools.Build.V1
13-
ruby:
14-
package_name: Google::Cloud::Devtools::Build::V1
15-
php:
16-
package_name: Google\Cloud\Devtools\Build\V1
17-
nodejs:
18-
package_name: build.v1
19-
# A list of API interface configurations.
20-
interfaces:
21-
# The fully qualified name of the API interface.
22-
- name: google.devtools.build.v1.PublishBuildEvent

google/devtools/build/v1/publish_build_event.proto

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;bui
2828
option java_multiple_files = true;
2929
option java_outer_classname = "BackendProto";
3030
option java_package = "com.google.devtools.build.v1";
31+
option php_namespace = "Google\\Cloud\\Build\\V1";
3132

3233
// A service for publishing BuildEvents. BuildEvents are generated by Build
3334
// Systems to record actions taken during a Build. Events occur in streams,
@@ -46,7 +47,8 @@ option java_package = "com.google.devtools.build.v1";
4647
// more than one build tool stream for an invocation attempt of a build.
4748
service PublishBuildEvent {
4849
option (google.api.default_host) = "buildeventservice.googleapis.com";
49-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
50+
option (google.api.oauth_scopes) =
51+
"https://www.googleapis.com/auth/cloud-platform";
5052

5153
// Publish a build event stating the new state of a build (typically from the
5254
// build queue). The BuildEnqueued event must be publishd before all other
@@ -58,29 +60,26 @@ service PublishBuildEvent {
5860
// The commit status of the request is reported by the RPC's util_status()
5961
// function. The error code is the canoncial error code defined in
6062
// //util/task/codes.proto.
61-
rpc PublishLifecycleEvent(PublishLifecycleEventRequest) returns (google.protobuf.Empty) {
63+
rpc PublishLifecycleEvent(PublishLifecycleEventRequest)
64+
returns (google.protobuf.Empty) {
6265
option (google.api.http) = {
6366
post: "/v1/projects/{project_id=*}/lifecycleEvents:publish"
6467
body: "*"
65-
additional_bindings {
66-
post: "/v1/lifecycleEvents:publish"
67-
body: "*"
68-
}
68+
additional_bindings { post: "/v1/lifecycleEvents:publish" body: "*" }
6969
};
7070
}
7171

7272
// Publish build tool events belonging to the same stream to a backend job
7373
// using bidirectional streaming.
74-
rpc PublishBuildToolEventStream(stream PublishBuildToolEventStreamRequest) returns (stream PublishBuildToolEventStreamResponse) {
74+
rpc PublishBuildToolEventStream(stream PublishBuildToolEventStreamRequest)
75+
returns (stream PublishBuildToolEventStreamResponse) {
7576
option (google.api.http) = {
7677
post: "/v1/projects/{project_id=*}/events:publish"
7778
body: "*"
78-
additional_bindings {
79-
post: "/v1/events:publish"
80-
body: "*"
81-
}
79+
additional_bindings { post: "/v1/events:publish" body: "*" }
8280
};
83-
option (google.api.method_signature) = "ordered_build_event,notification_keywords,project_id";
81+
option (google.api.method_signature) =
82+
"ordered_build_event,notification_keywords,project_id";
8483
}
8584
}
8685

@@ -106,8 +105,8 @@ message PublishLifecycleEventRequest {
106105
// The interactivity of this build.
107106
ServiceLevel service_level = 1;
108107

109-
// Required. The lifecycle build event. If this is a build tool event, the RPC will fail
110-
// with INVALID_REQUEST.
108+
// Required. The lifecycle build event. If this is a build tool event, the RPC
109+
// will fail with INVALID_REQUEST.
111110
OrderedBuildEvent build_event = 2 [(google.api.field_behavior) = REQUIRED];
112111

113112
// If the next event for this build or invocation (depending on the event
@@ -158,7 +157,8 @@ message OrderedBuildEvent {
158157
message PublishBuildToolEventStreamRequest {
159158
// Required. The build event with position info.
160159
// New publishing clients should use this field rather than the 3 above.
161-
OrderedBuildEvent ordered_build_event = 4 [(google.api.field_behavior) = REQUIRED];
160+
OrderedBuildEvent ordered_build_event = 4
161+
[(google.api.field_behavior) = REQUIRED];
162162

163163
// The keywords to be attached to the notification which notifies the start
164164
// of a new build event stream. BES only reads this field when sequence_number

0 commit comments

Comments
 (0)