Skip to content

Commit

Permalink
[Test} add command to quick e2e buildspec
Browse files Browse the repository at this point in the history
  • Loading branch information
g-gaston committed Jul 2, 2024
1 parent c920152 commit 8da4ac6
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 64 deletions.
132 changes: 69 additions & 63 deletions cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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_INFRA_CONFIG}
--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:
Expand Down
2 changes: 1 addition & 1 deletion cmd/integration_test/cmd/cleanuptinkerbell.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8da4ac6

Please sign in to comment.