Skip to content

Commit

Permalink
Add ability to set 'plugins' on CJI (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz authored Mar 21, 2022
1 parent d11cf85 commit 765de81
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bonfire/bonfire.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,13 @@ def _validate_opposing_opts(ctx, param, value):
type=str,
default="",
),
click.option(
"--plugins",
"-p",
help="comma,separated,list of IQE plugins (default: determined by ClowdApp)",
type=str,
default="",
),
click.option(
"--filter",
"-k",
Expand Down Expand Up @@ -1114,6 +1121,7 @@ def _cmd_process_iqe_cji(
requirements,
requirements_priority,
test_importance,
plugins,
local,
):
"""Process IQE ClowdJobInvocation template and print output"""
Expand All @@ -1129,6 +1137,7 @@ def _cmd_process_iqe_cji(
requirements,
requirements_priority,
test_importance,
plugins,
local,
)
print(json.dumps(cji_config, indent=2))
Expand All @@ -1154,6 +1163,7 @@ def _cmd_deploy_iqe_cji(
requirements,
requirements_priority,
test_importance,
plugins,
name,
requester,
duration,
Expand All @@ -1177,6 +1187,7 @@ def _cmd_deploy_iqe_cji(
requirements,
requirements_priority,
test_importance,
plugins,
local,
)

Expand Down
2 changes: 2 additions & 0 deletions bonfire/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def process_iqe_cji(
requirements="",
requirements_priority="",
test_importance="",
plugins="",
local=True,
):
log.info("processing IQE ClowdJobInvocation")
Expand All @@ -141,6 +142,7 @@ def process_iqe_cji(
params["FILTER"] = filter
params["ENV_NAME"] = env
params["IMAGE_TAG"] = image_tag
params["PLUGINS"] = plugins
params["NAME"] = cji_name or f"iqe-{str(uuid.uuid4()).split('-')[0]}"
params["APP_NAME"] = clowd_app_name
params["REQUIREMENTS"] = json.dumps(requirements)
Expand Down
3 changes: 3 additions & 0 deletions bonfire/resources/default-iqe-cji.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ objects:
imageTag: ${IMAGE_TAG}
marker: ${MARKER}
filter: ${FILTER}
plugins: ${PLUGINS}
dynaconfEnvName: ${ENV_NAME}
requirements: ${{REQUIREMENTS}}
requirementsPriority: ${{REQUIREMENTS_PRIORITY}}
Expand Down Expand Up @@ -43,3 +44,5 @@ parameters:
value: "[]"
- name: TEST_IMPORTANCE
value: "[]"
- name: PLUGINS
value: ""
3 changes: 3 additions & 0 deletions cicd/cji_smoke_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ set -e
: "${IQE_REQUIREMENTS:='""'}"
: "${IQE_REQUIREMENTS_PRIORITY:='""'}"
: "${IQE_TEST_IMPORTANCE:='""'}"
: "${IQE_PLUGINS:='""'}"


# minio client is used to fetch test artifacts from minio in the ephemeral ns
MC_IMAGE="quay.io/cloudservices/mc:latest"
Expand All @@ -46,6 +48,7 @@ POD=$(
--requirements "$IQE_REQUIREMENTS" \
--requirements-priority "$IQE_REQUIREMENTS_PRIORITY" \
--test-importance "$IQE_TEST_IMPORTANCE" \
--plugins "$IQE_PLUGINS" \
--env "clowder_smoke" \
--cji-name $CJI_NAME \
--namespace $NAMESPACE)
Expand Down

0 comments on commit 765de81

Please sign in to comment.