Skip to content

Commit

Permalink
Read e2e image TAG from envs
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Mazzotti <[email protected]>
  • Loading branch information
anmazzotti committed Dec 31, 2024
1 parent 4b05b96 commit fe69bb4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/testenv/bootstrapclusterproviders.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ package testenv

import (
"context"
"os"
"strings"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand All @@ -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,
Expand Down

0 comments on commit fe69bb4

Please sign in to comment.