From feb8a1b016e2902e9b215768555a9343f14e7451 Mon Sep 17 00:00:00 2001 From: Guillermo Gaston Date: Tue, 2 Jul 2024 20:16:26 +0000 Subject: [PATCH] [Test} add command to quick e2e buildspec --- .../build/buildspecs/quick-test-eks-a-cli.yml | 132 +++++++++--------- cmd/integration_test/cmd/cleanuptinkerbell.go | 2 +- 2 files changed, 70 insertions(+), 64 deletions(-) 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 46776a199820e..0e713a780b3b5 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 @@ -186,71 +186,77 @@ phases: - ${CODEBUILD_SRC_DIR}/cmd/integration_test/build/script/start_docker.sh - make eks-a-for-dev-e2e build-integration-test-binary e2e-tests-binary E2E_TAGS="e2e all_providers" E2E_OUTPUT_FILE=bin/e2e.test - export CLUSTER_NAME_PREFIX="${BRANCH_NAME//./-}" + # - > + # ./bin/test e2e cleanup vsphere + # -n ${CLUSTER_NAME_PREFIX} + # -v 4 + # - > + # ./bin/test e2e cleanup cloudstack + # -n ${CLUSTER_NAME_PREFIX} + # --delete-duplicate-networks + # -v 6 + # - > + # ./bin/test e2e cleanup nutanix + # -n ${CLUSTER_NAME_PREFIX} + # -e ${T_NUTANIX_ENDPOINT} + # -p ${T_NUTANIX_PORT} + # --insecure + # --ignoreErrors + # -v 4 - > - ./bin/test e2e cleanup vsphere - -n ${CLUSTER_NAME_PREFIX} - -v 4 - - > - ./bin/test e2e cleanup cloudstack - -n ${CLUSTER_NAME_PREFIX} - --delete-duplicate-networks - -v 6 - - > - ./bin/test e2e cleanup nutanix - -n ${CLUSTER_NAME_PREFIX} - -e ${T_NUTANIX_ENDPOINT} - -p ${T_NUTANIX_PORT} - --insecure - --ignoreErrors - -v 4 - build: - commands: - - export JOB_ID=$CODEBUILD_BUILD_ID - - BUNDLES_OVERRIDE=false - - | - if [ -f ./bin/local-bundle-release.yaml ]; then - BUNDLES_OVERRIDE=true - fi - - SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml) - - | - if [ -z "$TESTS" ] || [ "$TESTS" == "QUICK" ]; then - TESTS=$(yq e '.quick_tests | join("|")' ./test/e2e/QUICK_TESTS.yaml) - fi - - > - ./bin/test e2e run - -c ${INTEGRATION_TEST_INFRA_CONFIG} - -s ${INTEGRATION_TEST_STORAGE_BUCKET} - -j ${JOB_ID} - -i ${INTEGRATION_TEST_INSTANCE_PROFILE} - -m ${INTEGRATION_TEST_MAX_EC2_COUNT} - -p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT} - -r ${TESTS} - -v 4 - --skip ${SKIPPED_TESTS} - --bundles-override=${BUNDLES_OVERRIDE} - --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 - - > - ./bin/test e2e cleanup vsphere - -n ${CLUSTER_NAME_PREFIX} - -v 4 - - > - ./bin/test e2e cleanup cloudstack - -n ${CLUSTER_NAME_PREFIX} - -v 4 - - > - ./bin/test e2e cleanup nutanix - -n ${CLUSTER_NAME_PREFIX} - -e ${T_NUTANIX_ENDPOINT} - -p ${T_NUTANIX_PORT} - --insecure - --ignoreErrors + ./bin/test e2e cleanup tinkerbell + --storage-bucket ${INTEGRATION_TEST_STORAGE_BUCKET} + --instance-config ${INTEGRATION_TEST_INSTANCE_PROFILE} + --dry-run -v 4 + # build: + # commands: + # - export JOB_ID=$CODEBUILD_BUILD_ID + # - BUNDLES_OVERRIDE=false + # - | + # if [ -f ./bin/local-bundle-release.yaml ]; then + # BUNDLES_OVERRIDE=true + # fi + # - SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml) + # - | + # if [ -z "$TESTS" ] || [ "$TESTS" == "QUICK" ]; then + # TESTS=$(yq e '.quick_tests | join("|")' ./test/e2e/QUICK_TESTS.yaml) + # fi + # - > + # ./bin/test e2e run + # -c ${INTEGRATION_TEST_INFRA_CONFIG} + # -s ${INTEGRATION_TEST_STORAGE_BUCKET} + # -j ${JOB_ID} + # -i ${INTEGRATION_TEST_INSTANCE_PROFILE} + # -m ${INTEGRATION_TEST_MAX_EC2_COUNT} + # -p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT} + # -r ${TESTS} + # -v 4 + # --skip ${SKIPPED_TESTS} + # --bundles-override=${BUNDLES_OVERRIDE} + # --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 + # - > + # ./bin/test e2e cleanup vsphere + # -n ${CLUSTER_NAME_PREFIX} + # -v 4 + # - > + # ./bin/test e2e cleanup cloudstack + # -n ${CLUSTER_NAME_PREFIX} + # -v 4 + # - > + # ./bin/test e2e cleanup nutanix + # -n ${CLUSTER_NAME_PREFIX} + # -e ${T_NUTANIX_ENDPOINT} + # -p ${T_NUTANIX_PORT} + # --insecure + # --ignoreErrors + # -v 4 reports: e2e-reports: files: diff --git a/cmd/integration_test/cmd/cleanuptinkerbell.go b/cmd/integration_test/cmd/cleanuptinkerbell.go index 2ce85427ad7c7..817065b7e07cb 100644 --- a/cmd/integration_test/cmd/cleanuptinkerbell.go +++ b/cmd/integration_test/cmd/cleanuptinkerbell.go @@ -38,7 +38,7 @@ var ( func init() { cleanUpInstancesCmd.AddCommand(cleanUpTinkerbellCmd) cleanUpTinkerbellCmd.Flags().StringVarP(&storageBucket, storageBucketFlagName, "s", "", "S3 bucket name where tinkerbell hardware inventory files are stored") - runE2ECmd.Flags().StringVar(&instanceConfig, instanceConfigFlagName, "", "File path to the instance-config.yml config") + cleanUpTinkerbellCmd.Flags().StringVar(&instanceConfig, instanceConfigFlagName, "", "File path to the instance-config.yml config") cleanUpTinkerbellCmd.Flags().BoolVar(&dryRun, "dry-run", false, "Run command without deleting or powering off any resources") if err := cleanUpTinkerbellCmd.MarkFlagRequired(storageBucketFlagName); err != nil {