diff --git a/test/testenv/bootstrapclusterproviders.go b/test/testenv/bootstrapclusterproviders.go index c50c7f34..6c43f031 100644 --- a/test/testenv/bootstrapclusterproviders.go +++ b/test/testenv/bootstrapclusterproviders.go @@ -18,6 +18,8 @@ package testenv import ( "context" + "os" + "strings" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -38,6 +40,16 @@ func EKSBootsrapCluster(ctx context.Context, config *clusterctl.E2EConfig, clust region := config.Variables["KUBERNETES_MANAGEMENT_AWS_REGION"] Expect(region).ToNot(BeEmpty(), "KUBERNETES_MANAGEMENT_AWS_REGION must be set in the e2e config") + By("Overriding default image tags if needed") + imageTag := os.Getenv("TAG") + + if len(imageTag) > 0 { + for i := range config.Images { + image := &config.Images[i] + image.Name = strings.ReplaceAll(image.Name, "v0.0.1", imageTag) + } + } + eksCreateResult := &CreateEKSBootstrapClusterAndValidateImagesInputResult{} CreateEKSBootstrapClusterAndValidateImages(ctx, CreateEKSBootstrapClusterAndValidateImagesInput{ Name: clusterName,