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"`
|
||||
WorkingDir string `json:"working_dir"`
|
||||
Shell string `json:"shell"`
|
||||
User string `json:"user"`
|
||||
}
|
||||
|
||||
type SaveToWorkspaceStep struct {
|
||||
|
|
|
@ -115,7 +115,6 @@ fi
|
|||
rs.Environment = env
|
||||
rs.WorkingDir = cs.WorkingDir
|
||||
rs.Shell = cs.Shell
|
||||
rs.User = cs.User
|
||||
return rs
|
||||
|
||||
case *config.SaveToWorkspaceStep:
|
||||
|
|
|
@ -117,14 +117,11 @@ func (e *Executor) doRunStep(ctx context.Context, s *types.RunStep, t *types.Exe
|
|||
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
|
||||
if t.User != "" {
|
||||
user = t.User
|
||||
}
|
||||
if s.User != "" {
|
||||
user = s.User
|
||||
}
|
||||
|
||||
var cmd []string
|
||||
if s.Command != "" {
|
||||
|
|
|
@ -413,7 +413,6 @@ type RunStep struct {
|
|||
Environment map[string]string `json:"environment,omitempty"`
|
||||
WorkingDir string `json:"working_dir,omitempty"`
|
||||
Shell string `json:"shell,omitempty"`
|
||||
User string `json:"user,omitempty"`
|
||||
}
|
||||
|
||||
type SaveContent struct {
|
||||
|
|
Loading…
Reference in New Issue