Explorar el Código

feature: Add OT_ vars to each execution (#406)

James Read hace 1 año
padre
commit
76c9171356
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      internal/executor/executor.go

+ 3 - 0
internal/executor/executor.go

@@ -332,6 +332,9 @@ func stepACLCheck(req *ExecutionRequest) bool {
 func stepParseArgs(req *ExecutionRequest) bool {
 	var err error
 
+	req.Arguments["ot_executionTrackingId"] = req.TrackingID
+	req.Arguments["ot_username"] = req.AuthenticatedUser.Username
+
 	req.finalParsedCommand, err = parseActionArguments(req.Action.Shell, req.Arguments, req.Action, req.logEntry.ActionTitle, req.EntityPrefix)
 
 	if err != nil {