To use this function add it to the class library file named PluginSSHService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginSSHService.ts
Description: Orchestrator Function to Get a File via SSH
Public Function: executeSSHCommandInSession
publicexecuteSSHCommandInSession(objSSHSession:SSHSession,strSSHCommand:string,blnWait:boolean=true):string{
letstrStdOut:string=objSSHSession.executeCommand(strSSHCommand,blnWait);
this.objLogger.info("SSH StdOut:"+strStdOut);
if (objSSHSession.exitCode===0){
this.objLogger.info("SSH Output:"+objSSHSession.output);
}
else{
this.objLogger.info("SSH Error:"+objSSHSession.error);
}
returnstrStdOut;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
