| syntax = "proto3"; |
| package chromite.api; |
| |
| option go_package = "go.chromium.org/chromiumos/infra/proto/go/chromite/api"; |
| |
| import "chromite/api/build_api.proto"; |
| import "chromite/api/sysroot.proto"; |
| import "chromiumos/common.proto"; |
| |
| // An artifact is a file generated during or after a build. |
| message Artifact { |
| // Absolute path to the artifact file. |
| string path = 1; |
| } |
| |
| message PrepareForBuildRequest { |
| // The chroot where the sysroot lives. |
| chromiumos.Chroot chroot = 1; |
| |
| // The sysroot where the files live. |
| Sysroot sysroot = 2; |
| |
| // Information about the artifacts. |
| chromiumos.ArtifactsByService artifact_info = 3; |
| |
| // Whether we will proceed even if the build is POINTLESS. |
| bool forced_build_relevance = 4; |
| } |
| |
| message PrepareForBuildResponse { |
| // Whether this artifact requires a build. |
| enum BuildRelevance { |
| UNSPECIFIED = 0; |
| // Build is necessary to generate artifacts. |
| NEEDED = 1; |
| // Defer to other artifacts. Used primarily for aggregation of artifact |
| // results. |
| UNKNOWN = 2; |
| // Artifacts are already generated. The build is pointless. |
| POINTLESS = 3; |
| } |
| BuildRelevance build_relevance = 1; |
| } |
| |
| message BundleArtifactsRequest { |
| // The chroot where the sysroot lives. |
| chromiumos.Chroot chroot = 1; |
| |
| // The sysroot where the files live. |
| Sysroot sysroot = 2; |
| |
| // Artifact information. |
| chromiumos.ArtifactsByService artifact_info = 3; |
| |
| // Absolute path to the directory in which artifacts should be dropped. |
| string output_dir = 4; |
| } |
| |
| message BundleArtifactsResponse { |
| // The artifacts that were bundled. |
| chromiumos.UploadedArtifactsByService artifacts = 1; |
| } |
| |
| // Request describing where build artifact bundles for a given build target |
| // should be dumped. |
| // TODO(crbug/1034529): BundleRequest and BundleResponse are being deprecated |
| // (along with most of this file). See BundleArtifactsRequest/Response |
| message BundleRequest { |
| // The build target to bundle artifacts for. |
| // Deprecated. Use sysroot instead. |
| chromiumos.BuildTarget build_target = 1; |
| |
| // Absolute path to the directory in which artifacts should be dropped. |
| string output_dir = 2; |
| |
| // The chroot where the sysroot lives. |
| chromiumos.Chroot chroot = 3; |
| // The sysroot where the files live. |
| chromite.api.Sysroot sysroot = 4; |
| } |
| |
| // Response describing which bundles were dumped to the given output directory. |
| message BundleResponse { |
| // The artifacts that added to the output directory. |
| repeated Artifact artifacts = 1; |
| } |
| |
| // Request describing where to find build artifacts that are taken from a |
| // sysroot. |
| message BundleVmFilesRequest { |
| // The chroot where the sysroot lives. |
| chromiumos.Chroot chroot = 1; |
| // The sysroot where the files live. |
| chromite.api.Sysroot sysroot = 2; |
| // Test results directory relative to the sysroot. |
| string test_results_dir = 3; |
| |
| // Absolute path to the directory in which artifacts should be dropped. |
| string output_dir = 4; |
| } |
| |
| // DEPRECATED for recipes: crbug/1019868: This is being replaced with |
| // BundleRequest. |
| // Request describing where to find Chrome AFDO artifacts |
| message BundleChromeAFDORequest { |
| // The chroot where the orderfile lives. |
| chromiumos.Chroot chroot = 1; |
| // The build_target of the builder. |
| chromiumos.BuildTarget build_target = 2; |
| // Absolute path to the directory in which artifacts should be dropped. |
| string output_dir = 3; |
| // The type of AFDO artifact (benchmark-afdo or orderfile) |
| chromiumos.AFDOArtifactType artifact_type = 4; |
| } |
| |
| // Fetch the pinned guest image uris. |
| message PinnedGuestImageUriRequest { |
| // The chroot where the sysroot lives. |
| chromiumos.Chroot chroot = 1; |
| // The sysroot where the files live. |
| chromite.api.Sysroot sysroot = 2; |
| } |
| |
| // Response from fetching pinned guest image uris. |
| message PinnedGuestImageUriResponse { |
| message PinnedGuestImage { |
| string filename = 1; |
| string uri = 2; |
| } |
| |
| // The pinned guest images. |
| repeated PinnedGuestImage pinned_images = 1; |
| } |
| |
| // Service for bundling build artifacts and dumping them somewhere on disk. |
| service ArtifactsService { |
| option (service_options) = { |
| module: "artifacts", |
| service_chroot_assert: OUTSIDE, |
| }; |
| |
| // Prepare to build artifacts. |
| rpc PrepareForBuild(PrepareForBuildRequest) returns (PrepareForBuildResponse); |
| |
| // Bundle artifacts for build. |
| rpc BundleArtifacts(BundleArtifactsRequest) returns (BundleArtifactsResponse); |
| |
| // Fetch the pinned guest image locations. |
| rpc FetchPinnedGuestImageUris(PinnedGuestImageUriRequest) |
| returns (PinnedGuestImageUriResponse); |
| |
| // |
| // Everything that follows this line is planned to be deprecated |
| // as part of a BuildAPI refactoring detailed in crbug/1034529. |
| // Until that bug is closed, these endpoints are still used. |
| // |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive with all files needed for Autotest HW testing. |
| rpc BundleAutotestFiles(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create the ChromeOS Config JSON payload. |
| rpc BundleChromeOSConfig(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive of debug symbols. |
| rpc BundleDebugSymbols(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive with ebuild logs. |
| rpc BundleEbuildLogs(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive with unsigned firmware images. |
| rpc BundleFirmware(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar.xz archive for each image that has been created. |
| rpc BundleImageArchives(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Generate zip containing all built images for the target. |
| rpc BundleImageZip(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // DEPRECATED for recipes: crbug/1019868: This are being replaced by |
| // ToolchainService.Bundle{ArtifactType}() |
| // Create Chrome Benchmark AFDO builder artifacts. |
| rpc BundleAFDOGenerationArtifacts(BundleChromeAFDORequest) |
| returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive with all guest images test bundles. |
| rpc BundlePinnedGuestImages(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create the simple chrome artifacts. |
| rpc BundleSimpleChromeArtifacts(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive with all files needed for Tast HW testing. |
| rpc BundleTastFiles(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Generate minimal update payloads to be used in HW testing. |
| rpc BundleTestUpdatePayloads(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive with VM memory and disk images. |
| rpc BundleVmFiles(BundleVmFilesRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Generate a CPE report to a file. |
| rpc ExportCpeReport(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tar archive with fingerprint MCU on-device unittest binaries. |
| rpc BundleFpmcuUnittests(BundleRequest) returns (BundleResponse); |
| |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| // Create a tarball from the test image suitable for importing into GCE. |
| rpc BundleGceTarball(BundleRequest) returns (BundleResponse); |
| |
| // Generate all Remote Test Driver metadata. |
| // |
| // Response consists of one or more metadata files. Each file must contain a |
| // single binary encoded chromiumos.config.api.test.metadata.v1.Specification |
| // protobuf payload. |
| // Schema defined at |
| // https://chromium.googlesource.com/chromiumos/config/+/refs/heads/master/proto/chromiumos/config/api/test/metadata/v1/metadata.proto |
| // |
| // These artifacts partially replace chromiumos.ArtifactsByService.Test |
| // artifacts. See also, GenerateRemoteTestDriverImages() |
| // |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| rpc GenerateRemoteTestDriverSpecification(BundleRequest) |
| returns (BundleResponse); |
| |
| // Generate all Remote Test Driver container images. |
| // |
| // Response consists of one or more Docker container images. |
| // The images are identified by their Docker image digest. The filenames of |
| // the created artifacts are ignored. |
| // |
| // These artifacts partially replace chromiumos.ArtifactsByService.Test |
| // artifacts. See also, GenerateRemoteTestDriverSpecification() |
| // |
| // TODO(crbug/1034529): DEPRECATED use BundleArtifacts |
| rpc GenerateRemoteTestDriverImages(BundleRequest) returns (BundleResponse); |
| } |