Skip to content

Commit

Permalink
Adds missing clowder iqe cji options to bonfire (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
san7ket authored Aug 23, 2023
1 parent fa46833 commit 8a72995
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
41 changes: 41 additions & 0 deletions bonfire/bonfire.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,31 @@ def _validate_opposing_opts(ctx, param, value):
type=str,
default="",
),
click.option(
"--parallel-enabled",
help="iqe --parallel-enabled expression",
type=str,
default="",
),
click.option(
"--parallel-worker-count",
help="iqe --parallel-worker-count expression",
type=str,
default="",
),
click.option(
"--rp-args",
help="iqe --rp-args expression",
type=str,
default="",
),
click.option(
"--ibutsu-source",
help="iqe --ibutsu-source expression",
type=str,
default="",
),

_local_option,
]

Expand Down Expand Up @@ -1284,6 +1309,10 @@ def _cmd_process_iqe_cji(
plugins,
local,
selenium,
parallel_enabled,
parallel_worker_count,
rp_args,
ibutsu_source,
):
"""Process IQE ClowdJobInvocation template and print output"""
cji_config = process_iqe_cji(
Expand All @@ -1301,6 +1330,10 @@ def _cmd_process_iqe_cji(
plugins,
local,
selenium,
parallel_enabled,
parallel_worker_count,
rp_args,
ibutsu_source,
)
print(json.dumps(cji_config, indent=2))

Expand Down Expand Up @@ -1331,6 +1364,10 @@ def _cmd_deploy_iqe_cji(
duration,
local,
selenium,
parallel_enabled,
parallel_worker_count,
rp_args,
ibutsu_source,
pool,
force,
):
Expand All @@ -1355,6 +1392,10 @@ def _cmd_deploy_iqe_cji(
plugins,
local,
selenium,
parallel_enabled,
parallel_worker_count,
rp_args,
ibutsu_source,
)

log.debug("processed CJI config:\n%s", cji_config)
Expand Down
8 changes: 8 additions & 0 deletions bonfire/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ def process_iqe_cji(
plugins="",
local=True,
selenium=False,
parallel_enabled="",
parallel_worker_count="",
rp_args="",
ibutsu_source=""
):
log.info("processing IQE ClowdJobInvocation")

Expand Down Expand Up @@ -168,6 +172,10 @@ def process_iqe_cji(
params["REQUIREMENTS_PRIORITY"] = json.dumps(requirements_priority)
params["TEST_IMPORTANCE"] = json.dumps(test_importance)
params["DEPLOY_SELENIUM"] = json.dumps(selenium)
params["PARALLEL_ENABLED"] = json.dumps(parallel_enabled)
params["PARALLEL_WORKER_COUNT"] = json.dumps(parallel_worker_count)
params["RP_ARGS"] = json.dumps(rp_args)
params["IBUTSU_SOURCE"] = json.dumps(ibutsu_source)

processed_template = _process_template(template_data, params=params, local=local)

Expand Down
13 changes: 13 additions & 0 deletions bonfire/resources/default-iqe-cji.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ objects:
requirements: ${{REQUIREMENTS}}
requirementsPriority: ${{REQUIREMENTS_PRIORITY}}
testImportance: ${{TEST_IMPORTANCE}}
parallelEnabled: ${{PARALLEL_ENABLED}}
parallelWorkerCount: ${{PARALLEL_WORKER_COUNT}}
rpArgs: ${{RP_ARGS}}
ibutsuSource: ${{IBUTSU_SOURCE}}
ui:
selenium:
deploy: ${{DEPLOY_SELENIUM}}
Expand Down Expand Up @@ -51,3 +55,12 @@ parameters:
value: ""
- name: DEPLOY_SELENIUM
value: "false"
- name: PARALLEL_ENABLED
value: "true"
- name: PARALLEL_WORKER_COUNT
value: "2"
- name: RP_ARGS
value: ""
- name: IBUTSU_SOURCE
value: ""

0 comments on commit 8a72995

Please sign in to comment.