Skip to content

Commit

Permalink
fixes #74 by passing PATH env var i nthe worker action
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilio-Pega committed Sep 21, 2020
1 parent c797c28 commit fad5c4f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ internal abstract class HelmExecWorkAction

parameters.environment.ifPresent { environment.putAll(it) }

// A kubeconfig file can reference external programs. This is often used to do custom authorizations
// like when deploying to EKS. In order to correctly run those programs the PATH environmental variable
// must be forwarded. For some reason this isn't
// inherited from Gradle when the process is launched from a worker, even if no isolation is used.
environment.computeIfAbsent("PATH") {
System.getenv("PATH")
}
// For convenience, pass the KUBECONFIG environment variable to the worker. In general, having a
// Gradle build depend on environment is bad practice, but in this case it might be what many users
// will expect. Since KUBECONFIG env.var. is also set from the HelmServerOptions.kubeConfig property,
Expand Down

0 comments on commit fad5c4f

Please sign in to comment.