commit
c9dc8352a4
|
@ -199,6 +199,14 @@ func (e *ExecOp) Marshal(c *Constraints) (digest.Digest, []byte, *pb.OpMetadata,
|
|||
}
|
||||
}
|
||||
|
||||
if len(e.secrets) > 0 {
|
||||
addCap(&e.constraints, pb.CapExecMountSecret)
|
||||
}
|
||||
|
||||
if len(e.ssh) > 0 {
|
||||
addCap(&e.constraints, pb.CapExecMountSSH)
|
||||
}
|
||||
|
||||
pop, md := MarshalConstraints(c, &e.constraints)
|
||||
pop.Op = &pb.Op_Exec{
|
||||
Exec: peo,
|
||||
|
@ -266,10 +274,6 @@ func (e *ExecOp) Marshal(c *Constraints) (digest.Digest, []byte, *pb.OpMetadata,
|
|||
peo.Mounts = append(peo.Mounts, pm)
|
||||
}
|
||||
|
||||
if len(e.secrets) > 0 {
|
||||
addCap(&e.constraints, pb.CapMountSecret)
|
||||
}
|
||||
|
||||
for _, s := range e.secrets {
|
||||
pm := &pb.Mount{
|
||||
Dest: s.Target,
|
||||
|
|
|
@ -207,7 +207,7 @@ func defaultLLBCaps() []apicaps.PBCap {
|
|||
{ID: string(opspb.CapExecMountCacheSharing), Enabled: true},
|
||||
{ID: string(opspb.CapExecMountSelector), Enabled: true},
|
||||
{ID: string(opspb.CapExecMountTmpfs), Enabled: true},
|
||||
{ID: string(opspb.CapMountSecret), Enabled: true},
|
||||
{ID: string(opspb.CapExecMountSecret), Enabled: true},
|
||||
{ID: string(opspb.CapConstraints), Enabled: true},
|
||||
{ID: string(opspb.CapPlatform), Enabled: true},
|
||||
{ID: string(opspb.CapMetaIgnoreCache), Enabled: true},
|
||||
|
|
|
@ -39,7 +39,8 @@ const (
|
|||
CapExecMountCacheSharing apicaps.CapID = "exec.mount.cache.sharing"
|
||||
CapExecMountSelector apicaps.CapID = "exec.mount.selector"
|
||||
CapExecMountTmpfs apicaps.CapID = "exec.mount.tmpfs"
|
||||
CapMountSecret apicaps.CapID = "exec.mount.secret"
|
||||
CapExecMountSecret apicaps.CapID = "exec.mount.secret"
|
||||
CapExecMountSSH apicaps.CapID = "exec.mount.ssh"
|
||||
|
||||
CapConstraints apicaps.CapID = "constraints"
|
||||
CapPlatform apicaps.CapID = "platform"
|
||||
|
@ -207,7 +208,13 @@ func init() {
|
|||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapMountSecret,
|
||||
ID: CapExecMountSecret,
|
||||
Enabled: true,
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
||||
Caps.Init(apicaps.Cap{
|
||||
ID: CapExecMountSSH,
|
||||
Enabled: true,
|
||||
Status: apicaps.CapStatusExperimental,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue