1// Copyright 2021 The ChromiumOS Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto3"; 6 7package chromiumos.build.api; 8 9option go_package = "go.chromium.org/chromiumos/config/go/build/api"; 10 11// Chroot information needed to support container creation. Can be expanded. 12message Chroot { 13 string path = 1; 14} 15 16// build information needed to support container creation. Can be expanded. 17message BuildTarget { 18 string root = 1; 19} 20 21 22// Abstracted Result from any test container build. 23message TestContainersBuildResult { 24 message Success { 25 // Full path to the build artifact in the hosted container registry. 26 string registry_path = 1; 27 } 28 29 message Failure { 30 // Debugging details about the error that occurred. 31 string error_message = 1; 32 } 33 34 // Human friendly name of the container built (for debugging/reporting only). 35 string name = 1; 36 37 oneof result { 38 Success success = 2; 39 Failure failure = 3; 40 } 41} 42 43// Abstract Container Request. 44message TestContainersBuildRequest { 45 // The build target the test service containers are being build for. 46 BuildTarget build_target = 1; 47 48 // The chroot containing the sysroot. 49 Chroot chroot = 2; 50 51 // Build version number, which matches the build artifact version 52 // number that will be tested ultimately. 53 string version = 3; 54} 55 56message BuildTestContainersResponse { 57 // List of containers that were attempted to be built and the success/failure 58 // results for each. 59 repeated TestContainersBuildResult results = 1; 60} 61 62message BuildTestContainersRequest { 63 TestContainersBuildRequest request = 1; 64} 65 66// Interface to build any of the test containers. 67service ContainerService { 68 69 rpc BuildTestExecContainer(BuildTestContainersRequest) 70 returns (BuildTestContainersResponse) { 71 } 72 73 // TODO(dbeckett): migrate BuildTestServiceContainers here as well? 74} 75