update structure

This commit is contained in:
2016-06-25 16:29:06 +02:00
parent b8a0c788eb
commit e77a30b2bc
6 changed files with 29 additions and 9 deletions

View File

@@ -5,12 +5,15 @@ let sshRegex = /^(.*)\|?(.*)\|?(.*)/
let sshInstance:plugins.smartssh.SshInstance;
export let ssh = () => {
let done = plugins.q.defer();
sshInstance = new plugins.smartssh.SshInstance();
plugins.smartparam.forEachMinimatch(process.env,"NPMCI_SSHKEY_*",evaluateSshkey);
plugins.smartparam.forEachMinimatch(process.env,"NPMCI_SSHKEY_*",evaluateSshEnv);
sshInstance.writeToDisk();
done.resolve();
return done.promise;
};
export let evaluateSshkey = (sshkeyEnvVarArg) => {
let evaluateSshEnv = (sshkeyEnvVarArg) => {
let resultArray = sshRegex.exec(sshkeyEnvVarArg);
let sshKey = new plugins.smartssh.SshKey();