Skip to content

Commit 1883df2

Browse files
committed
kbuild.py: Remove hardcoded staging config
Cleanup, remove staging config left by mistake. Signed-off-by: Denys Fedoryshchenko <[email protected]>
1 parent 3a201f0 commit 1883df2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

kernelci/kbuild.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def __init__(self, node=None, jobname=None, params=None, jsonobj=None):
115115
self._firmware_dir = None
116116
self._af_dir = None
117117
self._node = node
118+
self._api_yaml = None
118119
return
119120
# load class from serialized json
120121
if jsonobj:
@@ -135,6 +136,7 @@ def __init__(self, node=None, jobname=None, params=None, jsonobj=None):
135136
self._apijobname = jsonobj['apijobname']
136137
self._storage_config = jsonobj['storage_config']
137138
self._fragments_dir = jsonobj['fragments_dir']
139+
self._api_yaml = jsonobj['api_yaml']
138140
return
139141
raise ValueError("No valid arguments provided")
140142

@@ -166,9 +168,10 @@ def set_workspace(self, workspace):
166168
self._srcdir = os.path.join(self._workspace, "linux")
167169
self.init_steps()
168170

169-
def set_api_config(self, api_config):
171+
def set_api_config(self, api_yaml):
170172
""" Set API config """
171-
self._api_config = api_config
173+
print(f"[_set_api_yaml] CONTENT: {api_yaml}")
174+
self._api_yaml = api_yaml
172175

173176
def set_storage_config(self, storage_config):
174177
""" Set storage config """
@@ -540,10 +543,9 @@ def submit(self, retcode):
540543
api_token = os.environ.get('KCI_API_TOKEN')
541544
if not api_token:
542545
raise ValueError("KCI_API_TOKEN is not set")
543-
config = '/etc/kernelci/core/api-configs.yaml'
544-
configs = kernelci.config.load(config)
545-
api = 'staging.kernelci.org'
546-
api_config = configs['api'][api]
546+
api_config = kernelci.config.api.API.load_from_yaml(
547+
yaml.safe_load(self._api_yaml), name='api'
548+
)
547549
api = kernelci.api.get_api(api_config, api_token)
548550
# TODO/FIXME: real detailed job result
549551
# pass fail skip incomplete

0 commit comments

Comments
 (0)