Added kitchen tests to test-salt-formulas pipeline.
Change-Id: I8349559682241f79d0f705042cdb88f266fdebe7
diff --git a/test-salt-formulas-pipeline.groovy b/test-salt-formulas-pipeline.groovy
index e53e652..e862498 100644
--- a/test-salt-formulas-pipeline.groovy
+++ b/test-salt-formulas-pipeline.groovy
@@ -6,6 +6,7 @@
*/
def common = new com.mirantis.mk.Common()
def gerrit = new com.mirantis.mk.Gerrit()
+def ruby = new com.mirantis.mk.Ruby()
def gerritRef
try {
@@ -48,6 +49,18 @@
}
}
}
+ stage("kitchen") {
+ if (fileExists(".kitchen.yml")) {
+ common.infoMsg(".kitchen.yml found running kitchen tests")
+ ruby.ensureRubyEnv()
+ ruby.installKitchen()
+ wrap([$class: 'AnsiColorBuildWrapper']) {
+ ruby.runKitchenTests()
+ }
+ } else {
+ common.infoMsg(".kitchen.yml not found")
+ }
+ }
} catch (Throwable e) {
// If there was an error or exception thrown, the build failed
currentBuild.result = "FAILURE"