blob: c3eff7d1c31193f4d4fee4117dbe3cc4ef53635b [file] [log] [blame]
syntax = "proto3";
package chromite.api;
option go_package = "go.chromium.org/chromiumos/infra/proto/go/chromite/api";
import "chromite/api/build_api.proto";
import "chromiumos/common.proto";
// Defines a single build directory in storage.
message Build {
// The board of the image "x86-mario", etc.
chromiumos.BuildTarget build_target = 1;
// The version of the image. "0.14.23.2", "3401.0.0", etc.
string version = 2;
// The bucket of the image. "chromeos-releases" as default.
string bucket = 3;
// The channel of the image "stable-channel", "nplusone", etc.
string channel = 4;
}
// Define a DLC image archived.
message DLCImage {
// An instance of Build that defines the build artifacts directory.
Build build = 1;
// The name of the DLC (e.g. 'terminal-dlc').
string dlc_id = 2;
// The name of the DLC package (e.g. 'package').
string dlc_package = 3;
// The name of the DLC image (e.g. 'dlc.img').
string dlc_image = 4;
}
// Define a signed ChromeOS image archived.
message SignedImage {
// An instance of Build that defines the build artifacts directory.
Build build = 1;
// The type of the image. Currently, "recovery" or "base" types are supported.
chromiumos.ImageType image_type = 2;
// The key the image was signed with. "premp", "mp", "mp-v2". This is not the
// board specific key name, but the general value used in image/payload names.
string key = 3;
}
// Define a unsigned ChromeOS image archived.
message UnsignedImage {
// An instance of Build that defines the build artifacts directory.
Build build = 1;
/// The type of the image. Currently one of "test", "recovery", or "base".
chromiumos.ImageType image_type = 2;
// The most recent branch corresponding to the version; "R19" etc.
string milestone = 3;
}
// Request payload generation to be done with a source and target image.
message GenerationRequest {
// Source image properties, must be either full_update or the same type as
// the included tgt_image_oneof. full_update indicates the lack of a source.
oneof src_image_oneof {
bool full_update = 1;
SignedImage src_signed_image = 2;
UnsignedImage src_unsigned_image = 3;
DLCImage src_dlc_image = 10;
}
// Target image properties.
oneof tgt_image_oneof {
SignedImage tgt_signed_image = 4;
UnsignedImage tgt_unsigned_image = 5;
DLCImage tgt_dlc_image = 11;
}
// TODO(engeg@): We could override the output build artifacts location via
// specifying an additional parameter build and supplying it to
// paygen_payload_lib.py but have chosen not to implement yet.
// The destination bucket (defaults to "chromeos-releases").
string bucket = 6;
// Should we run verification?
bool verify = 7;
// The keyset to sign with (e.g. "coral-mp-v16"), if empty do not sign,
// and may be ignored for certain request types (e.g. dlc).
string keyset = 8;
// Do not sign images or upload artifacts.
bool dryrun = 9;
}
// Result of a payload generation.
message GenerationResponse {
// Whether we've completed successfully.
bool success = 1;
}
// The image service definition.
service PayloadService {
option (service_options) = {
module: "payload",
service_chroot_assert: INSIDE,
};
rpc GeneratePayload(GenerationRequest) returns (GenerationResponse);
}