Skip to content

Commit

Permalink
kbuild.py: Remove hardcoded staging config
Browse files Browse the repository at this point in the history
Cleanup, remove staging config left by mistake.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Jan 16, 2024
1 parent ab7e287 commit b97c86a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions kernelci/kbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def __init__(self, node=None, jobname=None, params=None, jsonobj=None):
self._firmware_dir = None
self._af_dir = None
self._node = node
self._api_config = None
return
# load class from serialized json
if jsonobj:
Expand All @@ -124,6 +125,7 @@ def __init__(self, node=None, jobname=None, params=None, jsonobj=None):
self._apijobname = jsonobj['apijobname']
self._storage_config = jsonobj['storage_config']
self._fragments_dir = jsonobj['fragments_dir']
self._api_config = jsonobj['api_config']
return
raise ValueError("No valid arguments provided")

Expand Down Expand Up @@ -155,8 +157,9 @@ def set_workspace(self, workspace):
self._srcdir = os.path.join(self._workspace, "linux")
self.init_steps()

def set_api_config(self, api_config):
def set_api_config(self, api_yaml):
""" Set API config """
api_config = yaml.safe_load(api_yaml)
self._api_config = api_config

def set_storage_config(self, storage_config):
Expand Down Expand Up @@ -519,11 +522,7 @@ def submit(self, retcode):
api_token = os.environ.get('KCI_API_TOKEN')
if not api_token:
raise ValueError("KCI_API_TOKEN is not set")
config = '/etc/kernelci/core/api-configs.yaml'
configs = kernelci.config.load(config)
api = 'staging.kernelci.org'
api_config = configs['api'][api]
api = kernelci.api.get_api(api_config, api_token)
api = kernelci.api.get_api(self._api_config, api_token)
# TODO/FIXME: real detailed job result

Check warning on line 526 in kernelci/kbuild.py

View workflow job for this annotation

GitHub Actions / Lint

Line too long (116/100)
# pass fail skip incomplete
if retcode != 0:
Expand Down

0 comments on commit b97c86a

Please sign in to comment.