Skip to content
Snippets Groups Projects
Commit 0563573b authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Removed clean_environment (it was working only for shell scripts)

parent a4e4a3f3
No related branches found
No related tags found
No related merge requests found
...@@ -44,8 +44,7 @@ type RunnerConfig struct { ...@@ -44,8 +44,7 @@ type RunnerConfig struct {
Executor string `toml:"executor" json:"executor"` Executor string `toml:"executor" json:"executor"`
BuildsDir *string `toml:"builds_dir" json:"builds_dir"` BuildsDir *string `toml:"builds_dir" json:"builds_dir"`
CleanEnvironment *bool `toml:"clean_environment" json:"clean_environment"` Environment []string `toml:"environment" json:"environment"`
Environment []string `toml:"environment" json:"environment"`
Shell *string `toml:"shell" json:"shell"` Shell *string `toml:"shell" json:"shell"`
DisableVerbose *bool `toml:"disable_verbose" json:"disable_verbose"` DisableVerbose *bool `toml:"disable_verbose" json:"disable_verbose"`
......
...@@ -7,7 +7,6 @@ concurrent = 4 ...@@ -7,7 +7,6 @@ concurrent = 4
limit = 2 limit = 2
executor = "shell" executor = "shell"
builds_dir = "" builds_dir = ""
clean_environment = false
shell = "bash" shell = "bash"
[[runners]] [[runners]]
......
...@@ -28,7 +28,6 @@ This defines one runner entry. ...@@ -28,7 +28,6 @@ This defines one runner entry.
| `executor` | select how a project should be built, see next section | | `executor` | select how a project should be built, see next section |
| `shell` | the name of shell to generate the script (default value is platform dependent) | | `shell` | the name of shell to generate the script (default value is platform dependent) |
| `builds_dir` | directory where builds will be stored in context of selected executor (Locally, Docker, SSH) | | `builds_dir` | directory where builds will be stored in context of selected executor (Locally, Docker, SSH) |
| `clean_environment` | do not inherit any environment variables from the multi-runner process |
| `environment` | append or overwrite environment variables | | `environment` | append or overwrite environment variables |
| `disable_verbose` | don't print run commands | | `disable_verbose` | don't print run commands |
...@@ -43,7 +42,6 @@ Example: ...@@ -43,7 +42,6 @@ Example:
executor = "docker" executor = "docker"
builds_dir = "" builds_dir = ""
shell = "" shell = ""
clean_environment = false
environment = ["ENV=value", "LC_ALL=en_US.UTF-8"] environment = ["ENV=value", "LC_ALL=en_US.UTF-8"]
disable_verbose = false disable_verbose = false
``` ```
......
...@@ -40,12 +40,8 @@ func (s *ShellExecutor) Start() error { ...@@ -40,12 +40,8 @@ func (s *ShellExecutor) Start() error {
helpers.SetProcessGroup(s.cmd) helpers.SetProcessGroup(s.cmd)
// Inherit environment from current process
if !helpers.BoolOrDefault(s.Config.CleanEnvironment, false) {
s.cmd.Env = os.Environ()
}
// Fill process environment variables // Fill process environment variables
s.cmd.Env = os.Environ()
s.cmd.Env = append(s.cmd.Env, s.ShellScript.Environment...) s.cmd.Env = append(s.cmd.Env, s.ShellScript.Environment...)
s.cmd.Env = append(s.cmd.Env, s.Config.Environment...) s.cmd.Env = append(s.cmd.Env, s.Config.Environment...)
s.cmd.Stdout = s.BuildLog s.cmd.Stdout = s.BuildLog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment