Merge "Fix rubyVersion parsing"
diff --git a/test-salt-formulas-env.groovy b/test-salt-formulas-env.groovy
index 9364ae5..e007fe9 100644
--- a/test-salt-formulas-env.groovy
+++ b/test-salt-formulas-env.groovy
@@ -120,6 +120,7 @@
                 common.infoMsg("Openstack Kitchen test configuration found, running Openstack kitchen tests.")
                 kitchenFileName = ".kitchen.openstack.yml"
                 envOverrides.add("KITCHEN_YAML=${kitchenFileName}")
+                rubyVersion = '2.5.0'
                 withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: openstack_credentials_id,
                 usernameVariable: 'OS_USERNAME', passwordVariable: 'OS_PASSWORD'], ]) {
                   env.OS_USERNAME = OS_USERNAME
@@ -132,12 +133,9 @@
               } else if (fileExists(".kitchen.yml")) {
                 common.infoMsg("Docker Kitchen test configuration found, running Docker kitchen tests.")
                 kitchenFileName = ".kitchen.yml"
+                rubyVersion = '2.4.1'
               }
               if (kitchenFileName) {
-                def kitchenYML = readYaml(file: "${kitchenFileName}")
-                if (kitchenYML.containsKey("driver")) {
-                  rubyVersion = kitchenYML.get("mcp_ruby_version", '2.4.1')
-                }
                 ruby.ensureRubyEnv(rubyVersion)
                 if (!fileExists("Gemfile")) {
                   sh("curl -s -o ./Gemfile 'https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas/salt-formulas-scripts.git;a=blob_plain;f=Gemfile;hb=refs/heads/master'")
diff --git a/test-salt-formulas-pipeline.groovy b/test-salt-formulas-pipeline.groovy
index d7dcd40..4326433 100644
--- a/test-salt-formulas-pipeline.groovy
+++ b/test-salt-formulas-pipeline.groovy
@@ -179,16 +179,14 @@
               common.infoMsg("Openstack Kitchen test configuration found, running Openstack kitchen tests.")
               kitchenFileName = ".kitchen.openstack.yml"
               envOverrides.add("KITCHEN_YAML=${kitchenFileName}")
+              rubyVersion = '2.5.0'
             } else if (fileExists(".kitchen.yml")) {
               common.infoMsg("Docker Kitchen test configuration found, running Docker kitchen tests.")
               kitchenFileName = ".kitchen.yml"
+              rubyVersion = '2.4.1'
             }
             if (kitchenFileName) {
               def kitchenEnvs = []
-              def kitchenYML = readYaml(file: "${kitchenFileName}")
-              if (kitchenYML.containsKey("driver")) {
-                rubyVersion = kitchenYML.get("mcp_ruby_version", '2.4.1')
-              }
               ruby.ensureRubyEnv(rubyVersion)
               if (!fileExists("Gemfile")) {
                 sh("curl -s -o ./Gemfile 'https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas/salt-formulas-scripts.git;a=blob_plain;f=Gemfile;hb=refs/heads/master'")