llb: define platforms types

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2018-06-21 14:09:38 -07:00
parent a1bafadfd5
commit a245ec5b8b
2 changed files with 591 additions and 185 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,18 @@ message Op {
SourceOp source = 3;
CopyOp copy = 4;
BuildOp build = 5;
}
}
Platform platform = 10;
WorkerConstraints constraints = 11;
}
// Platform is github.com/opencontainers/image-spec/specs-go/v1.Platform
message Platform {
string Architecture = 1;
string OS = 2;
string Variant = 3;
string OSVersion = 4; // unused
repeated string OSFeatures = 5; // unused
}
// Input represents an input edge for an Op.
@@ -121,8 +132,9 @@ message OpMetadata {
// ignore_cache specifies to ignore the cache for this Op.
bool ignore_cache = 1;
// Description can be used for keeping any text fields that builder doesn't parse
map<string, string> description = 2;
WorkerConstraint worker_constraint = 3;
map<string, string> description = 2;
// index 3 reserved for WorkerConstraint in previous versions
// WorkerConstraint worker_constraint = 3;
ExportCache export_cache = 4;
}
@@ -137,8 +149,8 @@ message ProxyEnv {
string no_proxy = 4;
}
// WorkerConstraint is experimental and likely to be changed.
message WorkerConstraint {
// WorkerConstraints defines conditions for the worker
message WorkerConstraints {
repeated string filter = 1; // containerd-style filter
}