diff --git a/cmd/integration_test/build/buildspecs/cloudstack-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/cloudstack-test-eks-a-cli.yml index 7ddb782a208c..2e7b897537a4 100644 --- a/cmd/integration_test/build/buildspecs/cloudstack-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/cloudstack-test-eks-a-cli.yml @@ -108,7 +108,6 @@ phases: --cleanup-resources=true --test-report-folder=reports --branch-name=${BRANCH_NAME} - --baremetal-branch=${BAREMETAL_BRANCH} post_build: commands: - unset AWS_SDK_LOAD_CONFIG AWS_PROFILE diff --git a/cmd/integration_test/build/buildspecs/docker-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/docker-test-eks-a-cli.yml index e963b5c0c330..60026fdb0b00 100644 --- a/cmd/integration_test/build/buildspecs/docker-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/docker-test-eks-a-cli.yml @@ -57,7 +57,6 @@ phases: --bundles-override=${BUNDLES_OVERRIDE} --test-report-folder=reports --branch-name=${BRANCH_NAME} - --baremetal-branch=${BAREMETAL_BRANCH} reports: e2e-reports: files: diff --git a/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml index b72f7d7cb6ba..e468e244fb9e 100644 --- a/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml @@ -91,7 +91,6 @@ phases: --cleanup-resources=true --test-report-folder=reports --branch-name=${BRANCH_NAME} - --baremetal-branch=${BAREMETAL_BRANCH} post_build: commands: - > diff --git a/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml index 644cf726ea10..df906d23ca4c 100644 --- a/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml @@ -174,7 +174,6 @@ env: T_TINKERBELL_CP_NETWORK_CIDR: "tinkerbell_ci:cp_network_cidr" T_TINKERBELL_S3_INVENTORY_CSV_KEY: "tinkerbell_ci:s3_inventory_csv" T_TINKERBELL_S3_AG_INVENTORY_CSV_KEY: "tinkerbell_ci:s3_ag_inventory_csv" - BAREMETAL_BRANCH: "tinkerbell_ci:baremetal_branch" TEST_RUNNER_GOVC_USERNAME: "tinkerbell_ci:govc_username" TEST_RUNNER_GOVC_PASSWORD: "tinkerbell_ci:govc_password" TEST_RUNNER_GOVC_URL: "tinkerbell_ci:govc_url" @@ -237,7 +236,6 @@ phases: --cleanup-resources=true --test-report-folder=reports --branch-name=${BRANCH_NAME} - --baremetal-branch=${BAREMETAL_BRANCH} post_build: commands: - unset AWS_SDK_LOAD_CONFIG AWS_PROFILE diff --git a/cmd/integration_test/build/buildspecs/snow-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/snow-test-eks-a-cli.yml index 205822d66652..a2a5434df95d 100644 --- a/cmd/integration_test/build/buildspecs/snow-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/snow-test-eks-a-cli.yml @@ -58,7 +58,6 @@ phases: --cleanup-resources=true --test-report-folder=reports --branch-name=${BRANCH_NAME} - --baremetal-branch=${BAREMETAL_BRANCH} reports: e2e-reports: files: diff --git a/cmd/integration_test/build/buildspecs/tinkerbell-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/tinkerbell-test-eks-a-cli.yml index 5487f056a047..f87f8c3b2eb2 100644 --- a/cmd/integration_test/build/buildspecs/tinkerbell-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/tinkerbell-test-eks-a-cli.yml @@ -56,7 +56,6 @@ env: T_TINKERBELL_CP_NETWORK_CIDR: "tinkerbell_ci:cp_network_cidr" T_TINKERBELL_S3_INVENTORY_CSV_KEY: "tinkerbell_ci:s3_inventory_csv" T_TINKERBELL_S3_AG_INVENTORY_CSV_KEY: "tinkerbell_ci:s3_ag_inventory_csv" - BAREMETAL_BRANCH: "tinkerbell_ci:baremetal_branch" TEST_RUNNER_GOVC_USERNAME: "tinkerbell_ci:govc_username" TEST_RUNNER_GOVC_PASSWORD: "tinkerbell_ci:govc_password" TEST_RUNNER_GOVC_URL: "tinkerbell_ci:govc_url" @@ -106,7 +105,6 @@ phases: --cleanup-resources=true --test-report-folder=reports --branch-name=${BRANCH_NAME} - --baremetal-branch=${BAREMETAL_BRANCH} reports: e2e-reports: files: diff --git a/cmd/integration_test/build/buildspecs/vsphere-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/vsphere-test-eks-a-cli.yml index ac85a505be34..cf0bdf2b104e 100644 --- a/cmd/integration_test/build/buildspecs/vsphere-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/vsphere-test-eks-a-cli.yml @@ -126,7 +126,6 @@ phases: --cleanup-resources=true --test-report-folder=reports --branch-name=${BRANCH_NAME} - --baremetal-branch=${BAREMETAL_BRANCH} post_build: commands: - unset AWS_SDK_LOAD_CONFIG AWS_PROFILE diff --git a/cmd/integration_test/cmd/run.go b/cmd/integration_test/cmd/run.go index cb2eb112a694..fb3f1a768744 100644 --- a/cmd/integration_test/cmd/run.go +++ b/cmd/integration_test/cmd/run.go @@ -25,7 +25,6 @@ const ( testReportFolderFlagName = "test-report-folder" branchNameFlagName = "branch-name" instanceConfigFlagName = "instance-config" - baremetalBranchFlagName = "baremetal-branch" ) var runE2ECmd = &cobra.Command{ @@ -67,7 +66,6 @@ func init() { runE2ECmd.Flags().Bool(cleanupResourcesFlagName, false, "Flag to indicate if test resources should be cleaned up automatically as tests complete") runE2ECmd.Flags().String(testReportFolderFlagName, "", "Folder destination for JUnit tests reports") runE2ECmd.Flags().String(branchNameFlagName, "main", "EKS-A origin branch from where the tests are being run") - runE2ECmd.Flags().String(baremetalBranchFlagName, "main", "Branch for baremetal tests to run on") for _, flag := range requiredFlags { if err := runE2ECmd.MarkFlagRequired(flag); err != nil { @@ -88,7 +86,6 @@ func runE2E(ctx context.Context) error { cleanupResources := viper.GetBool(cleanupResourcesFlagName) testReportFolder := viper.GetString(testReportFolderFlagName) branchName := viper.GetString(branchNameFlagName) - baremetalBranchName := viper.GetString(baremetalBranchFlagName) runConf := e2e.ParallelRunConf{ MaxConcurrentTests: maxConcurrentTests, @@ -102,7 +99,6 @@ func runE2E(ctx context.Context) error { TestReportFolder: testReportFolder, BranchName: branchName, TestInstanceConfigFile: instanceConfigFile, - BaremetalBranchName: baremetalBranchName, Logger: logger.Get(), } diff --git a/internal/test/e2e/run.go b/internal/test/e2e/run.go index c5d2d752b4df..fad1e8a3978b 100644 --- a/internal/test/e2e/run.go +++ b/internal/test/e2e/run.go @@ -50,7 +50,6 @@ type ParallelRunConf struct { CleanupResources bool TestReportFolder string BranchName string - BaremetalBranchName string Logger logr.Logger } @@ -89,7 +88,7 @@ func RunTestsInParallel(conf ParallelRunConf) error { // For Tinkerbell tests, get hardware inventory pool var invCatalogue map[string]*hardwareCatalogue - if strings.EqualFold(conf.BranchName, conf.BaremetalBranchName) { + if containsTinkerbellTest(testsList) { nonAirgappedHardwareInv, err := getNonAirgappedHardwarePool(conf.StorageBucket) if err != nil { return fmt.Errorf("failed to get non-airgapped hardware inventory for Tinkerbell Tests: %v", err) @@ -411,7 +410,7 @@ func splitTests(testsList []string, conf ParallelRunConf) ([]instanceRunConf, er runConfs = append(runConfs, newInstanceRunConf(awsSession, conf, len(runConfs), testName, ips, []*api.Hardware{}, 0, false, Ec2TestRunnerType, testRunnerConfig)) } - if strings.EqualFold(conf.BranchName, conf.BaremetalBranchName) { + if containsTinkerbellTest(testsList) { tinkerbellIPManager := newE2EIPManager(conf.Logger, os.Getenv(tinkerbellControlPlaneNetworkCidrEnvVar)) runConfs, err = appendNonAirgappedTinkerbellRunConfs(awsSession, testsList, conf, testRunnerConfig, runConfs, tinkerbellIPManager) if err != nil { @@ -588,3 +587,13 @@ func logTinkerbellTestHardwareInfo(conf *instanceRunConf, action string) { } conf.Logger.V(1).Info(action+" hardware for TestRunner", "hardwarePool", strings.Join(hardwareInfo, ", ")) } + +func containsTinkerbellTest(testsList []string) bool { + tinkerbellTestsRe := regexp.MustCompile(tinkerbellTestsRe) + for _, testName := range testsList { + if tinkerbellTestsRe.MatchString(testName) { + return true + } + } + return false +} diff --git a/scripts/e2e_test_docker.sh b/scripts/e2e_test_docker.sh index 99d016d24882..41421ac9a0e0 100755 --- a/scripts/e2e_test_docker.sh +++ b/scripts/e2e_test_docker.sh @@ -100,7 +100,6 @@ $BIN_FOLDER/test e2e run \ -r ${TEST_REGEX} \ --bundles-override=${BUNDLES_OVERRIDE} \ --test-report-folder=${TEST_REPORT_FOLDER} \ - --baremetal-branch="" \ -v4 # Faking cross-platform versioned folders for dry-run