From 8a5f679a5871e20b0b21a4b8f42ff90688709bf2 Mon Sep 17 00:00:00 2001 From: Brandon Squizzato <35474886+bsquizz@users.noreply.github.com> Date: Wed, 13 Oct 2021 14:47:05 -0400 Subject: [PATCH] Revert "Allow setting iqe requirements in CJI (#120)" (#130) This reverts commit 980da5312fcec94664c284a4ea08a8d98f308ba0. --- bonfire/bonfire.py | 42 ++------------------------ bonfire/processor.py | 6 ---- bonfire/resources/default-iqe-cji.yaml | 9 ------ cicd/cji_smoke_test.sh | 18 +---------- 4 files changed, 3 insertions(+), 72 deletions(-) diff --git a/bonfire/bonfire.py b/bonfire/bonfire.py index f85c9cd6..90cc8816 100755 --- a/bonfire/bonfire.py +++ b/bonfire/bonfire.py @@ -500,24 +500,6 @@ def _validate_reservation_duration(ctx, param, value): type=str, default=None, ), - click.option( - "--requirements", - help="iqe --requirements expression", - type=str, - default="", - ), - click.option( - "--requirements-priority", - help="iqe --requirements-priority expression", - type=str, - default="", - ), - click.option( - "--test-importance", - help="iqe --test-importance expression", - type=str, - default="", - ), ] _reservation_process_options = [ @@ -1015,31 +997,11 @@ def _err_handler(err): @main.command("process-iqe-cji") @options(_iqe_cji_process_options) def _cmd_process_iqe_cji( - clowd_app_name, - debug, - marker, - filter, - env, - image_tag, - cji_name, - template_file, - requirements, - requirements_priority, - test_importance, + clowd_app_name, debug, marker, filter, env, image_tag, cji_name, template_file ): """Process IQE ClowdJobInvocation template and print output""" cji_config = process_iqe_cji( - clowd_app_name, - debug, - marker, - filter, - env, - image_tag, - cji_name, - template_file, - requirements, - requirements_priority, - test_importance, + clowd_app_name, debug, marker, filter, env, image_tag, cji_name, template_file ) print(json.dumps(cji_config, indent=2)) diff --git a/bonfire/processor.py b/bonfire/processor.py index d55b9ba9..9db547ab 100644 --- a/bonfire/processor.py +++ b/bonfire/processor.py @@ -90,9 +90,6 @@ def process_iqe_cji( image_tag="", cji_name=None, template_path=None, - requirements="", - requirements_priority="", - test_importance="", ): log.info("processing IQE ClowdJobInvocation") @@ -112,9 +109,6 @@ def process_iqe_cji( params["IMAGE_TAG"] = image_tag params["NAME"] = cji_name or f"iqe-{str(uuid.uuid4()).split('-')[0]}" params["APP_NAME"] = clowd_app_name - params["REQUIREMENTS"] = requirements - params["REQUIREMENTS_PRIORITY"] = requirements_priority - params["TEST_IMPORTANCE"] = test_importance processed_template = process_template(template_data, params=params) diff --git a/bonfire/resources/default-iqe-cji.yaml b/bonfire/resources/default-iqe-cji.yaml index 3ab2a524..3e50210e 100644 --- a/bonfire/resources/default-iqe-cji.yaml +++ b/bonfire/resources/default-iqe-cji.yaml @@ -17,9 +17,6 @@ objects: marker: ${MARKER} filter: ${FILTER} dynaconfEnvName: ${ENV_NAME} - requirements: ${REQUIREMENTS} - requirementsPriority: ${REQUIREMENTS_PRIORITY} - testImportance: ${TEST_IMPORTANCE} parameters: - name: NAME @@ -37,9 +34,3 @@ parameters: - name: ENV_NAME value: "clowder_smoke" required: true -- name: REQUIREMENTS - value: "" -- name: REQUIREMENTS_PRIORITY - value: "" -- name: TEST_IMPORTANCE - value: "" diff --git a/cicd/cji_smoke_test.sh b/cicd/cji_smoke_test.sh index 38e2e621..6ca47f7e 100644 --- a/cicd/cji_smoke_test.sh +++ b/cicd/cji_smoke_test.sh @@ -5,9 +5,6 @@ #IQE_CJI_TIMEOUT="10m" -- timeout value to pass to 'oc wait', should be slightly higher than expected test run time #IQE_MARKER_EXPRESSION="something AND something_else" -- pytest marker, can be "" if no filter desired #IQE_FILTER_EXPRESSION="something AND something_else" -- pytest filter, can be "" if no filter desired -#IQE_REQUIREMENTS="{'something','something_else'}" -- iqe requirements filter, can be "" if no filter desired -#IQE_REQUIREMENTS_PRIORITY="{'something','something_else'}" -- iqe requirements filter, can be "" if no filter desired -#IQE_TEST_IMPORTANCE="{'something','something_else'}" -- iqe requirements filter, can be "" if no filter desired #NAMESPACE="mynamespace" -- namespace to deploy iqe pod into, usually set by 'deploy_ephemeral_env.sh' # In order for the deploy-iqe-cji to run correctly, we must set the marker and filter to "" if they @@ -16,9 +13,6 @@ : "${IQE_MARKER_EXPRESSION:='""'}" : "${IQE_FILTER_EXPRESSION:='""'}" : "${IQE_IMAGE_TAG:='""'}" -: "${IQE_REQUIREMENTS:='""'}" -: "${IQE_REQUIREMENTS_PRIORITY:='""'}" -: "${IQE_TEST_IMPORTANCE:='""'}" CJI_NAME="$COMPONENT_NAME-smoke-tests" @@ -28,17 +22,7 @@ if [[ -z $IQE_CJI_TIMEOUT ]]; then fi # Invoke the CJI using the options set via env vars -pod=$( - bonfire deploy-iqe-cji $COMPONENT_NAME \ - --marker "$IQE_MARKER_EXPRESSION" \ - --filter "$IQE_FILTER_EXPRESSION" \ - --image-tag "${IQE_IMAGE_TAG}" \ - --requirements "$IQE_REQUIREMENTS" \ - --requirements-priority "$IQE_REQUIREMENTS_PRIORITY" \ - --test-importance "$IQE_TEST_IMPORTANCE" \ - --env "clowder_smoke" \ - --cji-name $CJI_NAME \ - --namespace $NAMESPACE) +pod=$(bonfire deploy-iqe-cji $COMPONENT_NAME -m "$IQE_MARKER_EXPRESSION" -k "$IQE_FILTER_EXPRESSION" -e "clowder_smoke" --cji-name $CJI_NAME -n $NAMESPACE --image-tag "${IQE_IMAGE_TAG}") # Pipe logs to background to keep them rolling in jenkins oc logs -n $NAMESPACE $pod -f &