mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-09-29 23:12:00 +00:00
parent
02ea3369d5
commit
06538504f8
1 changed files with 5 additions and 5 deletions
|
@ -39,20 +39,20 @@ func (e *docker) toConfig(step *types.Step) *container.Config {
|
||||||
AttachStdout: true,
|
AttachStdout: true,
|
||||||
AttachStderr: true,
|
AttachStderr: true,
|
||||||
}
|
}
|
||||||
env := make(map[string]string)
|
configEnv := make(map[string]string)
|
||||||
maps.Copy(env, step.Environment)
|
maps.Copy(configEnv, step.Environment)
|
||||||
|
|
||||||
if len(step.Commands) != 0 {
|
if len(step.Commands) != 0 {
|
||||||
env, entry, cmd := common.GenerateContainerConf(step.Commands, e.info.OSType)
|
env, entry, cmd := common.GenerateContainerConf(step.Commands, e.info.OSType)
|
||||||
for k, v := range env {
|
for k, v := range env {
|
||||||
env[k] = v
|
configEnv[k] = v
|
||||||
}
|
}
|
||||||
config.Entrypoint = entry
|
config.Entrypoint = entry
|
||||||
config.Cmd = cmd
|
config.Cmd = cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(env) != 0 {
|
if len(configEnv) != 0 {
|
||||||
config.Env = toEnv(env)
|
config.Env = toEnv(configEnv)
|
||||||
}
|
}
|
||||||
if len(step.Volumes) != 0 {
|
if len(step.Volumes) != 0 {
|
||||||
config.Volumes = toVol(step.Volumes)
|
config.Volumes = toVol(step.Volumes)
|
||||||
|
|
Loading…
Reference in a new issue