Rework entrypoints (#3269)

Co-authored-by: Thomas Anderson <127358482+zc-devs@users.noreply.github.com>
Co-authored-by: 6543 <m.huber@kithara.com>
This commit is contained in:
qwerty287
2024-05-02 14:52:01 +02:00
committed by GitHub
parent e229a8e633
commit 225ddb586d
9 changed files with 93 additions and 34 deletions

View File

@@ -147,15 +147,14 @@ func podContainer(step *types.Step, podName, goos string, options BackendOptions
container.ImagePullPolicy = v1.PullAlways
}
if len(step.Commands) != 0 {
scriptEnv, command, args := common.GenerateContainerConf(step.Commands, goos)
if len(step.Entrypoint) > 0 {
command = step.Entrypoint
}
if len(step.Commands) > 0 {
scriptEnv, command := common.GenerateContainerConf(step.Commands, goos)
container.Command = command
container.Args = []string{args}
maps.Copy(step.Environment, scriptEnv)
}
if len(step.Entrypoint) > 0 {
container.Command = step.Entrypoint
}
container.Env = mapToEnvVars(step.Environment)