Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kernelci/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class Args: # pylint: disable=too-few-public-methods
'-n', '--page-number', type=int,
help="Page number in paginated data"
)
runtime = click.option(
'--runtime',
help="Name of the runtime config entry"
)
settings = click.option(
'-s', '--toml-settings', 'settings',
help="Path to the TOML user settings"
Expand All @@ -58,10 +62,6 @@ class Args: # pylint: disable=too-few-public-methods
'-v', '--verbose/--no-verbose', default=None,
help="Print more details output"
)
runtime = click.option(
'--runtime',
help="Name of the Runtime environment config entry"
)


def catch_http_error(func):
Expand Down
19 changes: 12 additions & 7 deletions kernelci/cli/job.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2023 Collabora Limited
# Copyright (C) 2022-2023 Collabora Limited
# Author: Guillaume Tucker <guillaume.tucker@collabora.com>
# Author: Jeny Sadadia <jeny.sadadia@collabora.com>

Expand Down Expand Up @@ -42,19 +42,24 @@ def new(name, node_id, node_json, config, # pylint: disable=too-many-arguments
elif node_json:
input_node = helper.load_json(node_json)
else:
raise click.ClickException("Either --node-id or --node-json \
is required.")
raise click.ClickException(
"Either --node-id or --node-json is required."
)
job_config = configs['jobs'][name]
job_node = helper.create_job_node(job_config, input_node)
click.echo(json.dumps(job_node, indent=indent))


@kci_job.command(secrets=True)
@click.argument('node-id')
@click.option('--platform', help="Name of the platform to run the job",
required=True)
@click.option('--output', help="Path of the directory where to generate \
the job data")
@click.option(
'--platform', required=True,
help="Name of the platform to run the job"
)
@click.option(
'--output',
help="Path of the directory where to generate the job data"
)
@Args.runtime
@Args.storage
@Args.config
Expand Down