-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathimgbuilder.proto
141 lines (112 loc) · 3.38 KB
/
imgbuilder.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
syntax = "proto3";
package builder;
option go_package = "github.com/gitpod-io/gitpod/image-builder/api";
import "content-service-api/initializer.proto";
service ImageBuilder {
// ResolveBaseImage returns the "digest" form of a Docker image tag thereby making it absolute.
rpc ResolveBaseImage(ResolveBaseImageRequest) returns (ResolveBaseImageResponse) {};
// ResolveWorkspaceImage returns information about a build configuration without actually attempting to build anything.
rpc ResolveWorkspaceImage(ResolveWorkspaceImageRequest) returns (ResolveWorkspaceImageResponse) {};
// Build initiates the build of a Docker image using a build configuration. If a build of this
// configuration is already ongoing no new build will be started.
rpc Build(BuildRequest) returns (stream BuildResponse) {};
// Logs listens to the build output of an ongoing Docker build identified build the build ID
rpc Logs(LogsRequest) returns (stream LogsResponse) {};
// ListBuilds returns a list of currently running builds
rpc ListBuilds(ListBuildsRequest) returns (ListBuildsResponse) {};
}
message BuildSource {
oneof from {
BuildSourceReference ref = 1;
BuildSourceDockerfile file = 2;
};
}
message BuildSourceReference {
string ref = 1;
}
message BuildSourceDockerfile {
contentservice.WorkspaceInitializer source = 1;
string dockerfile_version = 2;
string dockerfile_path = 3;
string context_path = 4;
}
message ResolveBaseImageRequest {
string ref = 1;
BuildRegistryAuth auth = 2;
}
message ResolveBaseImageResponse {
string ref = 1;
}
message ResolveWorkspaceImageRequest {
BuildSource source = 1;
BuildRegistryAuth auth = 2;
}
message ResolveWorkspaceImageResponse {
string ref = 1;
string base_ref = 3;
BuildStatus status = 2;
}
message BuildRequest {
BuildSource source = 1;
BuildRegistryAuth auth = 2;
bool force_rebuild = 3;
string triggered_by = 4;
string supervisor_ref = 5;
string base_image_name_resolved = 6;
}
message BuildRegistryAuth {
oneof mode {
BuildRegistryAuthTotal total = 1;
BuildRegistryAuthSelective selective = 2;
}
map<string, string> additional = 3;
}
message BuildRegistryAuthTotal {
bool allow_all = 1;
}
message BuildRegistryAuthSelective {
bool allow_baserep = 1;
bool allow_workspacerep = 2;
repeated string any_of = 3;
}
message BuildResponse {
// deprecated(cw): expect this field to go away in a future version.
// it's redundant with the build info.
string ref = 1;
string base_ref = 4;
// deprecated(cw): expect this field to go away in a future version.
// it's redundant with the build info.
BuildStatus status = 2;
string message = 3;
BuildInfo info = 5;
}
enum BuildStatus {
unknown = 0;
running = 1;
done_success = 2;
done_failure = 3;
}
message LogsRequest {
string build_ref = 1;
bool censored = 2;
string build_id = 3;
}
message LogsResponse {
bytes content = 1;
}
message ListBuildsRequest {}
message ListBuildsResponse {
repeated BuildInfo builds = 1;
}
message BuildInfo {
string ref = 1;
string base_ref = 4;
BuildStatus status = 2;
int64 started_at = 3;
string build_id = 5;
LogInfo log_info = 6;
}
message LogInfo {
string url = 1;
map<string, string> headers = 2;
}