mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Specify KUBE_ROOT for test-e2e-node/AWS to work
test-e2e-node for AWS is out-of-tree so that we won't need to vendor in AWS related packages. For this to work, some of the scripts/golang code need to know where the k8s tree is git cloned. So let's add an option to lookup the env var, so that we can then, change directory to this specified directory to run some make commands Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
e7e7532a05
commit
d3ae6c2df3
@ -27,6 +27,11 @@ import (
|
|||||||
|
|
||||||
// GetK8sRootDir returns the root directory for kubernetes, if present in the gopath.
|
// GetK8sRootDir returns the root directory for kubernetes, if present in the gopath.
|
||||||
func GetK8sRootDir() (string, error) {
|
func GetK8sRootDir() (string, error) {
|
||||||
|
dir := os.Getenv("KUBE_ROOT")
|
||||||
|
if len(dir) > 0 {
|
||||||
|
return dir, nil
|
||||||
|
}
|
||||||
|
|
||||||
dir, err := RootDir()
|
dir, err := RootDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
Loading…
Reference in New Issue
Block a user