Add test-mk-cookiecutter-templates-chunk pipeline
* upcoming preparation for runing
test-mk-cookiecutter-templates in paralell
Change-Id: I88ba4de606caf9a71fd64824ce32c122830fc460
Partial-Bug: PROD-22050 (PROD:22050)
diff --git a/test-cookiecutter-reclass-chunk.groovy b/test-cookiecutter-reclass-chunk.groovy
new file mode 100644
index 0000000..7568a06
--- /dev/null
+++ b/test-cookiecutter-reclass-chunk.groovy
@@ -0,0 +1,23 @@
+package com.mirantis.mk
+def common = new com.mirantis.mk.Common()
+def saltModelTesting = new com.mirantis.mk.SaltModelTesting()
+
+/**
+ * Test CC model wrapper
+ * EXTRA_VARIABLES_YAML: yaml based string, to be directly passed into testCCModel
+ */
+
+timeout(time: 1, unit: 'HOURS') {
+node() {
+ try {
+ extra_vars = readYaml text: EXTRA_VARIABLES_YAML
+ saltModelTesting.testCCModel(extra_vars)
+ currentBuild.description = cfg.modelFile
+ } catch (Throwable e) {
+ // If there was an error or exception thrown, the build failed
+ currentBuild.result = "FAILURE"
+ currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
+ throw e
+ }
+ }
+ }