Fixed null reference in test-salt-formulas pipeline
Change-Id: I80ec9d4285010c4f70c679598bceeb8701afdbaf
diff --git a/test-salt-formulas-pipeline.groovy b/test-salt-formulas-pipeline.groovy
index cded75c..d305b16 100644
--- a/test-salt-formulas-pipeline.groovy
+++ b/test-salt-formulas-pipeline.groovy
@@ -95,7 +95,7 @@
}
common.infoMsg("Running kitchen testing, parallel mode: " + KITCHEN_TESTS_PARALLEL.toBoolean())
wrap([$class: 'AnsiColorBuildWrapper']) {
- if(!kitchenEnvs.isEmpty()){
+ if(kitchenEnvs && !kitchenEnvs.isEmpty()){
common.infoMsg("Found multiple environment, first running kitchen without custom env")
ruby.runKitchenTests("", KITCHEN_TESTS_PARALLEL.toBoolean())
for(int i=0;i<kitchenEnvs.size();i++){