Skip to content

Commit 5fd0df9

Browse files
use env value to set kustomize path in test
Signed-off-by: DiptoChakrabarty <[email protected]>
1 parent 61e7dcc commit 5fd0df9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/framework/clusterctl/repository.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,13 @@ func YAMLForComponentSource(ctx context.Context, source ProviderVersionSource) (
149149
}
150150
data = buf
151151
case KustomizeSource:
152+
// Set Path of kustomize binary using CAPI_KUSTOMIZE_PATH env
153+
kustomizePath, ok := os.LookupEnv("CAPI_KUSTOMIZE_PATH")
154+
if !ok {
155+
kustomizePath = "kustomize"
156+
}
152157
kustomize := exec.NewCommand(
153-
exec.WithCommand("kustomize"),
158+
exec.WithCommand(kustomizePath),
154159
exec.WithArgs("build", source.Value))
155160
stdout, stderr, err := kustomize.Run(ctx)
156161
if err != nil {

0 commit comments

Comments
 (0)