CI: Harmonize exec_script() API
Instead of making the function a class member, make it an instance member because (1) it is more aligned with other functions, notably, run(), and (2) especially for RemoteCmd() it can be faster, as successive exec_script() calls do not require a new SSH connection.
This commit is contained in:
@@ -426,7 +426,8 @@ class Cluster:
|
||||
logging.debug(f'Running physims from server: {node}')
|
||||
script = "scripts/oc-deploy-physims.sh"
|
||||
options = f"oaicicd-core-for-ci-ran {oc_release} {image_tag} {self.eNBSourceCodePath}"
|
||||
ret = cls_cmd.runScript(node, script, 600, options)
|
||||
with cls_cmd.getConnection(node) as c:
|
||||
ret = c.exec_script(script, 600, options)
|
||||
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
|
||||
with cls_cmd.getConnection(node) as ssh:
|
||||
details_json = archiveArtifact(ssh, ctx, f'{self.eNBSourceCodePath}/ci-scripts/{oc_release}-tests.json')
|
||||
|
||||
Reference in New Issue
Block a user