1 // Copyright 2018 Google LLC.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
18 package google.devtools.resultstore.v2;
20 import "google/devtools/resultstore/v2/common.proto";
21 import "google/devtools/resultstore/v2/coverage_summary.proto";
22 import "google/devtools/resultstore/v2/file.proto";
24 option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
25 option java_multiple_files = true;
26 option java_package = "com.google.devtools.resultstore.v2";
28 // An Invocation typically represents the result of running a tool. Each has a
29 // unique ID, typically generated by the server. Target resources under each
30 // Invocation contain the bulk of the data.
32 // The resource ID components that identify the Invocation.
35 string invocation_id = 1;
38 // The resource name. Its format must be:
39 // invocations/${INVOCATION_ID}
42 // The resource ID components that identify the Invocation. They must match
43 // the resource name after proper encoding.
46 // The aggregate status of the invocation.
47 StatusAttributes status_attributes = 3;
49 // When this invocation started and its duration.
52 // Attributes of this invocation.
53 InvocationAttributes invocation_attributes = 5;
55 // The workspace the tool was run in.
56 WorkspaceInfo workspace_info = 6;
58 // Arbitrary name-value pairs.
59 // This is implemented as a multi-map. Multiple properties are allowed with
60 // the same key. Properties will be returned in lexicographical order by key.
61 repeated Property properties = 7;
63 // A list of file references for invocation level files.
64 // The file IDs must be unique within this list. Duplicate file IDs will
65 // result in an error. Files will be returned in lexicographical order by ID.
66 // Use this field to specify build logs, and other invocation level logs.
67 repeated File files = 8;
69 // Summary of aggregate coverage across all Actions in this Invocation.
70 // the server populates this for you in the post-processing phase.
71 repeated LanguageCoverageSummary coverage_summaries = 9;
74 // If known, represents the state of the user/build-system workspace.
75 message WorkspaceContext {}
77 // Describes the workspace under which the tool was invoked, this includes
78 // information that was fed into the command, the source code referenced, and
80 message WorkspaceInfo {
81 // Data about the workspace that might be useful for debugging.
82 WorkspaceContext workspace_context = 1;
84 // Where the tool was invoked
87 // The client's working directory where the build/test was run from.
88 string working_directory = 4;
90 // Tools should set tool_tag to the name of the tool or use case.
93 // The command lines invoked. The first command line is the one typed by the
94 // user, then each one after that should be an expansion of the previous
96 repeated CommandLine command_lines = 7;
99 // The command and arguments that produced this Invocation.
100 message CommandLine {
101 // A label describing this command line.
104 // The command-line tool that is run: argv[0].
107 // The arguments to the above tool: argv[1]...argv[N].
108 repeated string args = 3;
110 // The actual command that was run with the tool. (e.g. "build", or "test")
111 // Omit if the tool doesn't accept a command.
112 // This is a duplicate of one of the fields in args.
116 // Attributes that apply to all invocations.
117 message InvocationAttributes {
118 // The project ID this invocation is associated with. This must be
119 // set in the CreateInvocation call, and can't be changed.
120 string project_id = 1;
122 // The list of users in the command chain. The first user in this sequence
123 // is the one who instigated the first command in the chain.
124 repeated string users = 2;
126 // Labels to categorize this invocation.
127 // This is implemented as a set. All labels will be unique. Any duplicate
128 // labels added will be ignored. Labels will be returned in lexicographical
129 // order. Labels should be short, easy to read, and you
130 // shouldn't have more than a handful.
131 // Labels should match regex \w([- \w]*\w)?
132 // Labels should not be used for unique properties such as unique IDs.
133 // Use properties in cases that don't meet these conditions.
134 repeated string labels = 3;
136 // This field describes the overall context or purpose of this invocation.
137 // It will be used in the UI to give users more information about
138 // how or why this invocation was run.
139 string description = 4;
141 // If this Invocation was run in the context of a larger Continuous
142 // Integration build or other automated system, this field may contain more
143 // information about the greater context.
144 repeated InvocationContext invocation_contexts = 6;
147 // Describes the invocation context which includes a display name and URL.
148 message InvocationContext {
149 // A human readable name for the context under which this Invocation was run.
150 string display_name = 1;
152 // A URL pointing to a UI containing more information