• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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// SoftwareAttribute defines how attributes of the SoftwareBundle
12// are encoded into key-value pairs.
13//
14// This encoding allows branch/build agnostic systems (e.g. CI/CQ)
15// to perform matching/optimization around test coverage requirements
16// for a given set of builds without having to couple to branch/build
17// specific proto-definitions.
18message SoftwareAttribute {
19  // Globally unique identifier for the attribute. Usually reflects the
20  // contents of the attribute, e.g. "arc_version".
21  message Id {
22    string value = 1;
23  }
24
25  Id id = 1;
26
27  // Field in a chromiumos.build.api.SoftwareBundle proto that defines the
28  // value of the attribute.
29  //
30  // The path should start at SoftwareBundle and be delimited by ".". For
31  // example, "system_image.metadata.arc.version". Only scalar fields are
32  // allowed as the last component of the path.
33  string field_path = 2;
34}
35
36message SoftwareAttributeList {
37  repeated SoftwareAttribute sw_attributes = 1;
38}
39
40// SoftwareCriterion describes a group of sw builds,
41// based on a set of criteria that will be evaluated against a collection
42// of SoftwareBundle payloads.
43message SoftwareCriterion {
44  // ID of the Sw attribute that must meet the criterion.
45  SoftwareAttribute.Id attribute_id = 1;
46  // List of ANY acceptable values to match (OR logic is applied).
47  // Values must match exactly (i.e. no regexp, wildcard, etc. allowed).
48  repeated string values = 2;
49}
50