Ensure we switch to k8s root directory for dockerized builds during e2e-node ci job

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2025-02-27 10:05:39 -05:00
parent 8cca6d98a4
commit fb3b163ca0
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59

View File

@ -77,6 +77,8 @@ func BuildTargets(cgo bool) error {
klog.Infof("Building dockerized k8s binaries targets %s for architecture %s", targets, GetTargetBuildArch())
// Multi-architecture build is only supported in dockerized build
cmd = exec.Command(filepath.Join(k8sRoot, "build/run.sh"), "make", fmt.Sprintf("WHAT=%s", what), fmt.Sprintf("KUBE_BUILD_PLATFORMS=%s", GetTargetBuildArch()))
// Ensure we run this command in k8s root directory for dockerized build
cmd.Dir = k8sRoot
}
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr