Merge pull request #110 from sgotti/runservice_remove_run_step_user

runservice: remove run step user
This commit is contained in:
Simone Gotti 2019-09-11 16:24:59 +02:00 committed by GitHub
commit 512fdb361a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 7 deletions

View File

@ -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 {

View File

@ -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:

View File

@ -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 != "" {

View File

@ -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 {