feat(agent): execute RunStepCmd with WORKFLOW_ENV capture

This commit is contained in:
2026-07-20 11:29:14 +01:00
parent 1b286762f6
commit f0c86a3bdf
2 changed files with 129 additions and 0 deletions
+11
View File
@@ -17,6 +17,7 @@ import (
"time"
"github.com/mrhid6/vantage/agent/internal/config"
agentexec "github.com/mrhid6/vantage/agent/internal/exec"
grpcclient "github.com/mrhid6/vantage/agent/internal/grpc"
"github.com/mrhid6/vantage/agent/internal/grpc/pb"
"github.com/mrhid6/vantage/agent/internal/keys"
@@ -186,6 +187,16 @@ func connectAndHandleStream(ctx context.Context, cfg *config.Config) error {
if cmd.ApplyUpdates != nil {
go handleApplyUpdates(cfg, cmd)
}
if cmd.RunStep != nil {
res := agentexec.RunStep(cmd.RunStep)
res.CommandId = cmd.CommandId
_ = stream.Send(&pb.AgentMessage{
ServerId: cfg.ServerID,
AgentToken: cfg.AgentToken,
StepResult: res,
})
continue
}
}
}