// Copyright 2020 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";

package chromiumos.config.prototype;

option go_package = "go.chromium.org/chromiumos/config/go/prototype";

import "chromiumos/config/prototype/release_target_id.proto";
import "chromiumos/config/prototype/signing.proto";
import "chromiumos/build/api/system_image.proto";

// Defines a collection of build targets that are all part of the same logical
// release target and corresponding config tied to the release target.
// E.g. octopus -> octopus-kernel-debug, octopus-kernel_4_14, octopus
// Build targets will change over time with alternate builds, but the release
// target will remain stable over time.
message ReleaseTarget {
  ReleaseTargetId id = 1;

  // Human friendly name
  string name = 2;

  // Defines the primary build target for a given release.
  chromiumos.build.api.SystemImage.BuildTarget build_target = 3;

  // Defines the uprev build variants for a given release.
  repeated ReleaseTarget variant_targets = 4;

  // Defines the signing instructions set for this release.
  SigningInstructions signing_instructions = 5;

  // Defines the criticality of the target when used to determine things like
  // the overall build return status, as well as if we should update the LKGM
  // version, etc.
  enum TargetCriticality {
    // Should not be used.
    CRIT_UNDEFINED = 0;
    // In bringup or otherwise not ready, ignore for overall status.
    CRIT_EXPERIMENTAL = 1;
    // Used for informational purposes. Might affect some status calculations.
    CRIT_INFORMATIONAL = 2;
    // In production, deployed or otherwise critical.
    CRIT_PRODUCTION = 3;
  }

  // This target's level of.
  TargetCriticality criticality = 6;
}
