CI: new Python classes for SSH & Local execution
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/copyoutspawn 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.