Skip to content

Commit

Permalink
Revert "Allow setting iqe requirements in CJI (#120)" (#130)
Browse files Browse the repository at this point in the history
This reverts commit 980da53.
  • Loading branch information
bsquizz authored Oct 13, 2021
1 parent 980da53 commit 8a5f679
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 72 deletions.
42 changes: 2 additions & 40 deletions bonfire/bonfire.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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))

Expand Down
6 changes: 0 additions & 6 deletions bonfire/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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)

Expand Down
9 changes: 0 additions & 9 deletions bonfire/resources/default-iqe-cji.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ objects:
marker: ${MARKER}
filter: ${FILTER}
dynaconfEnvName: ${ENV_NAME}
requirements: ${REQUIREMENTS}
requirementsPriority: ${REQUIREMENTS_PRIORITY}
testImportance: ${TEST_IMPORTANCE}

parameters:
- name: NAME
Expand All @@ -37,9 +34,3 @@ parameters:
- name: ENV_NAME
value: "clowder_smoke"
required: true
- name: REQUIREMENTS
value: ""
- name: REQUIREMENTS_PRIORITY
value: ""
- name: TEST_IMPORTANCE
value: ""
18 changes: 1 addition & 17 deletions cicd/cji_smoke_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

Expand All @@ -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 &
Expand Down

0 comments on commit 8a5f679

Please sign in to comment.