cros-publish provides various publish services for ChromiumOS. All of the services supports both CLI and server modes. Currently there are 3 pubish services:
go/cros-publish-dd
The follow sections use gcs-publish as an example. tko-publish and rdb-publish follow the same pattern.
All provided paths should absolute paths.
publish/cmd/gcs-publish$ go build . publish/cmd/gcs-publish$ ./gcs-publish cli -input <input_file_path> -output <desired_output_file_path> -log-path <desired_log_path>
Examples:
Start gcs-publish server
publish/cmd/gcs-publish$ go build . publish/cmd/gcs-publish$ ./gcs-publish server --port <port_number> server_command.go: running server mode: gcs_publish_server.go: gcs-publish-service listen to request at [::]:44349
Examples: port_number = 44349 (Provide 0 if we want to start the server on a random available port)
Once the server has started, you may use grpc_cli
to interact with the services. Example:
$ grpc_cli ls localhost:44349 chromiumos.test.api.GenericPublishService --channel_creds_type insecure Publish Publish
Create key.json
file in the same folder(gcs-publish) where the binary lives. This file should have the GCS credentials that will be used for GCS upload. This info will be made part of the input soon and will be expected to provide this as part of input.
$ grpc_cli call localhost:38869 chromiumos.test.api.GenericPublishService.Publish --infile=input.textproto --channel_creds_type insecure connecting to localhost:44349 name: "operations/655953d1-968f-4e61-96c8-8929c53c002a" done: true response { type_url: "type.googleapis.com/chromiumos.test.api.PublishResponse" } Rpc succeeded with OK status
Examples: