Fix prepareSshAgentKey method in MK ssl
We need to include MK common to use
getSshCredentials method inside prepareSshAgentKey.
Change-Id: Ia94a9cb6f019bfbc8fadb7d133694fc1d7460f8d
diff --git a/src/com/mirantis/mk/ssl.groovy b/src/com/mirantis/mk/ssl.groovy
index 504e5d3..7619ff5 100644
--- a/src/com/mirantis/mk/ssl.groovy
+++ b/src/com/mirantis/mk/ssl.groovy
@@ -33,7 +33,8 @@
* @param credentialsId Jenkins credentials name to lookup private key
*/
def prepareSshAgentKey(credentialsId) {
- c = getSshCredentials(credentialsId)
+ def common = new com.mirantis.mk.common()
+ c = common.getSshCredentials(credentialsId)
sh("test -d ~/.ssh || mkdir -m 700 ~/.ssh")
sh('pgrep -l -u $USER -f | grep -e ssh-agent\$ >/dev/null || ssh-agent|grep -v "Agent pid" > ~/.ssh/ssh-agent.sh')
sh("echo '${c.getPrivateKey()}' > ~/.ssh/id_rsa_${credentialsId} && chmod 600 ~/.ssh/id_rsa_${credentialsId}")