Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openairinterface5G openairinterface5G
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 69
    • Issues 69
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 51
    • Merge requests 51
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • oaioai
  • openairinterface5Gopenairinterface5G
  • Merge requests
  • !1867

CI: new Python classes for SSH & Local execution

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Robert Schmidt requested to merge ci-new-ssh into develop Dec 15, 2022
  • Overview 43
  • Commits 7
  • Pipelines 0
  • Changes 4

The existing SSHConnection class is ... not good:

  • it does not give the return code
  • it typically scans for a single & before returning (this can lead to false-positives, e.g., it did in !1806 (merged) where a & appeared in a diff)
  • it assumes password-based SSH auth
  • there is no corresponding "local execution" class with the same interface
  • copyin/copyout spawn new processes
  • ... probably more

I add two new classes LocalCmd and RemoteCmd. They have the same interface. Results of a call are returned in the Python subprocess class format. We can now check for return codes, and stuff with & cannot happen. RemoteCmd has no means for a password, and assumes certificate-based SSH. If the return-code of any command is non-null, it will print a warning and the command output (this can be suppressed). For the moment, only the cluster-build and (RHEL) and image-build (Ubuntu) builders use it (more to follow later, I don't want to change everything at once). There interface is somewhat backwards-compatible to SSHConnection, both have a command call.

Also, the tags in the cluster images follow the branch-commitId[1:8] pattern of the Ubuntu CI.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ci-new-ssh