Cleanup ssh and git functions
Change-Id: I5e9a1acab12e479d86321aa9822e6383a707d624
diff --git a/release-salt-formulas-pipeline.groovy b/release-salt-formulas-pipeline.groovy
index 90ce9ef..7660636 100644
--- a/release-salt-formulas-pipeline.groovy
+++ b/release-salt-formulas-pipeline.groovy
@@ -1,13 +1,14 @@
def common = new com.mirantis.mk.Common()
+def ssh = new com.mirantis.mk.Ssh()
node() {
try{
stage("checkout") {
dir("src") {
- common.prepareSshAgentKey(CREDENTIALS_ID)
- common.ensureKnownHosts(SOURCE_URL)
+ ssh.prepareSshAgentKey(CREDENTIALS_ID)
+ ssh.ensureKnownHosts(SOURCE_URL)
git url: SOURCE_URL, branch: "master", credentialsId: CREDENTIALS_ID, poll: false
sh("git branch --set-upstream-to=origin/master")
- common.agentSh("make update")
+ ssh.agentSh("make update")
}
}
stage("tag") {
@@ -17,7 +18,7 @@
}
stage("push") {
dir("src/formulas") {
- common.agentSh("mr --trust-all -j4 --force run git push gerrit $TAG")
+ ssh.agentSh("mr --trust-all -j4 --force run git push gerrit $TAG")
}
}
} catch (Throwable e) {
@@ -27,4 +28,4 @@
} finally {
common.sendNotification(currentBuild.result,"",["slack"])
}
-}
\ No newline at end of file
+}