Use Pepper instead of sending http request from jenkins master
Change-Id: I2ddfe19ae9c70731989da7ba07fa7720da797721
diff --git a/update-salt-master-formulas.groovy b/update-salt-master-formulas.groovy
index f3e7d1c..0cb995c 100644
--- a/update-salt-master-formulas.groovy
+++ b/update-salt-master-formulas.groovy
@@ -10,20 +10,21 @@
def common = new com.mirantis.mk.Common()
def salt = new com.mirantis.mk.Salt()
+def python = new com.mirantis.mk.Python()
-def saltMaster
+def pepperEnv = "pepperEnv"
def target = ['expression': TARGET_SERVERS, 'type': 'compound']
def result
node("python") {
try {
- stage('Connect to Salt master') {
- saltMaster = salt.connection(SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
+ stage('Setup virtualenv for Pepper') {
+ python.setupPepperVirtualenv(venvPepper, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
}
stage('Update Salt formulas') {
- result = salt.runSaltCommand(saltMaster, 'local', target, 'state.apply', null, 'salt.master.env')
+ result = salt.runSaltCommand(pepperEnv, 'local', target, 'state.apply', null, 'salt.master.env')
salt.checkResult(result)
}