mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 08:06:52 +02:00
parent
02ea3369d5
commit
06538504f8
@ -39,20 +39,20 @@ func (e *docker) toConfig(step *types.Step) *container.Config {
|
||||
AttachStdout: true,
|
||||
AttachStderr: true,
|
||||
}
|
||||
env := make(map[string]string)
|
||||
maps.Copy(env, step.Environment)
|
||||
configEnv := make(map[string]string)
|
||||
maps.Copy(configEnv, step.Environment)
|
||||
|
||||
if len(step.Commands) != 0 {
|
||||
env, entry, cmd := common.GenerateContainerConf(step.Commands, e.info.OSType)
|
||||
for k, v := range env {
|
||||
env[k] = v
|
||||
configEnv[k] = v
|
||||
}
|
||||
config.Entrypoint = entry
|
||||
config.Cmd = cmd
|
||||
}
|
||||
|
||||
if len(env) != 0 {
|
||||
config.Env = toEnv(env)
|
||||
if len(configEnv) != 0 {
|
||||
config.Env = toEnv(configEnv)
|
||||
}
|
||||
if len(step.Volumes) != 0 {
|
||||
config.Volumes = toVol(step.Volumes)
|
||||
|
Loading…
Reference in New Issue
Block a user