Add Yaml validy check for salt-models test
Change-Id: I48c5318cdf63651d7bad98b498889f65426b9cd6
diff --git a/test-salt-models-pipeline.groovy b/test-salt-models-pipeline.groovy
index c931e60..fcfba0c 100644
--- a/test-salt-models-pipeline.groovy
+++ b/test-salt-models-pipeline.groovy
@@ -136,6 +136,10 @@
}
}
+ stage("Check YAML") {
+ sh("git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD | grep .yml | xargs -I {} python -c \"import yaml; yaml.load(open('{}', 'r'))\" \\;")
+ }
+
stage("test-nodes") {
if(checkouted) {
def modifiedClusters = null
diff --git a/test-system-reclass-pipeline.groovy b/test-system-reclass-pipeline.groovy
index 03bd9fe..49755bc 100644
--- a/test-system-reclass-pipeline.groovy
+++ b/test-system-reclass-pipeline.groovy
@@ -58,6 +58,8 @@
documentationOnly = sh(script: "git diff-tree --no-commit-id --name-only -r HEAD | grep -v .releasenotes", returnStatus: true) == 1
}
+ sh("git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD | grep .yml | xargs -I {} python -c \"import yaml; yaml.load(open('{}', 'r'))\" \\;")
+
def branches = [:]
def testModels = documentationOnly ? [] : TEST_MODELS.split(',')
for (int i = 0; i < testModels.size(); i++) {