mirror of
https://github.com/moby/buildkit.git
synced 2026-08-05 07:10:23 +00:00
add current tracing context detection and exec propagation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit bc9a83144c83e9fd78007b7bfe92e8082c59d40e)
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/moby/buildkit/executor"
|
||||
"github.com/moby/buildkit/snapshot"
|
||||
"github.com/moby/buildkit/util/network"
|
||||
traceexec "github.com/moby/buildkit/util/tracing/exec"
|
||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/pkg/errors"
|
||||
@@ -76,6 +77,8 @@ func GenerateSpec(ctx context.Context, meta executor.Meta, mounts []executor.Mou
|
||||
hostname = meta.Hostname
|
||||
}
|
||||
|
||||
meta.Env = append(meta.Env, traceexec.Environ(ctx)...)
|
||||
|
||||
opts = append(opts,
|
||||
oci.WithProcessArgs(meta.Args...),
|
||||
oci.WithEnv(meta.Env),
|
||||
|
||||
Reference in New Issue
Block a user