Merge pull request #110 from sgotti/runservice_remove_run_step_user
runservice: remove run step user
This commit is contained in:
commit
512fdb361a
|
@ -151,7 +151,6 @@ type RunStep struct {
|
||||||
Environment map[string]Value `json:"environment,omitempty"`
|
Environment map[string]Value `json:"environment,omitempty"`
|
||||||
WorkingDir string `json:"working_dir"`
|
WorkingDir string `json:"working_dir"`
|
||||||
Shell string `json:"shell"`
|
Shell string `json:"shell"`
|
||||||
User string `json:"user"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type SaveToWorkspaceStep struct {
|
type SaveToWorkspaceStep struct {
|
||||||
|
|
|
@ -115,7 +115,6 @@ fi
|
||||||
rs.Environment = env
|
rs.Environment = env
|
||||||
rs.WorkingDir = cs.WorkingDir
|
rs.WorkingDir = cs.WorkingDir
|
||||||
rs.Shell = cs.Shell
|
rs.Shell = cs.Shell
|
||||||
rs.User = cs.User
|
|
||||||
return rs
|
return rs
|
||||||
|
|
||||||
case *config.SaveToWorkspaceStep:
|
case *config.SaveToWorkspaceStep:
|
||||||
|
|
|
@ -117,14 +117,11 @@ func (e *Executor) doRunStep(ctx context.Context, s *types.RunStep, t *types.Exe
|
||||||
shell = s.Shell
|
shell = s.Shell
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to use the container specified user
|
// use the container specified user and override with task user if defined
|
||||||
user := t.Containers[0].User
|
user := t.Containers[0].User
|
||||||
if t.User != "" {
|
if t.User != "" {
|
||||||
user = t.User
|
user = t.User
|
||||||
}
|
}
|
||||||
if s.User != "" {
|
|
||||||
user = s.User
|
|
||||||
}
|
|
||||||
|
|
||||||
var cmd []string
|
var cmd []string
|
||||||
if s.Command != "" {
|
if s.Command != "" {
|
||||||
|
|
|
@ -413,7 +413,6 @@ type RunStep struct {
|
||||||
Environment map[string]string `json:"environment,omitempty"`
|
Environment map[string]string `json:"environment,omitempty"`
|
||||||
WorkingDir string `json:"working_dir,omitempty"`
|
WorkingDir string `json:"working_dir,omitempty"`
|
||||||
Shell string `json:"shell,omitempty"`
|
Shell string `json:"shell,omitempty"`
|
||||||
User string `json:"user,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type SaveContent struct {
|
type SaveContent struct {
|
||||||
|
|
Loading…
Reference in New Issue