setMaxAliasesForCollections

PRODX-3456

Change-Id: Ieaa27edb7acba44e8c733fe21cca357c989dde1e
diff --git a/src/com/mirantis/mcp/Common.groovy b/src/com/mirantis/mcp/Common.groovy
index b83a714..1b98f37 100644
--- a/src/com/mirantis/mcp/Common.groovy
+++ b/src/com/mirantis/mcp/Common.groovy
@@ -7,6 +7,7 @@
 @Grab(group='org.yaml', module='snakeyaml', version='1.17')
 import org.yaml.snakeyaml.Yaml
 import org.yaml.snakeyaml.DumperOptions
+import org.yaml.snakeyaml.LoaderOptions
 
 /**
  * https://issues.jenkins-ci.org/browse/JENKINS-26481
@@ -45,7 +46,9 @@
  */
 @NonCPS
 def loadYAML(String data) {
-  def yaml = new Yaml()
+  LoaderOptions options = new LoaderOptions()
+  options.setMaxAliasesForCollections(100)
+  def yaml = new Yaml(options)
   return yaml.load(data)
 }