feat: Host environment (#1293)

This commit is contained in:
ChristopherHX
2022-11-16 22:29:45 +01:00
committed by GitHub
parent 64e68bd7f2
commit f2b98ed301
39 changed files with 1396 additions and 187 deletions

View File

@@ -68,7 +68,8 @@ func (sr *stepRun) setupShellCommandExecutor() common.Executor {
return err
}
return sr.RunContext.JobContainer.Copy(ActPath, &container.FileEntry{
rc := sr.getRunContext()
return rc.JobContainer.Copy(rc.JobContainer.GetActPath(), &container.FileEntry{
Name: scriptName,
Mode: 0755,
Body: script,
@@ -128,7 +129,8 @@ func (sr *stepRun) setupShellCommand(ctx context.Context) (name, script string,
logger.Debugf("Wrote add-mask command to '%s'", name)
}
scriptPath := fmt.Sprintf("%s/%s", ActPath, name)
rc := sr.getRunContext()
scriptPath := fmt.Sprintf("%s/%s", rc.JobContainer.GetActPath(), name)
sr.cmd, err = shellquote.Split(strings.Replace(scCmd, `{0}`, scriptPath, 1))
return name, script, err