Merge "Ensure that only ASCII characters make it into the jobs JIRA:OCTO-105"
authorAric Gardner <agardner@linuxfoundation.org>
Thu, 9 Jul 2015 16:15:01 +0000 (16:15 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Thu, 9 Jul 2015 16:15:01 +0000 (16:15 +0000)
jjb/releng-jobs.yaml
jjb/verify-releng [new file with mode: 0755]

index 19c6bab..3d52678 100644 (file)
@@ -60,9 +60,8 @@
 
 
     builders:
-        - shell: |
-            source /opt/virtualenv/jenkins-job-builder/bin/activate
-            jenkins-jobs test jjb/
+        - shell:
+            !include-raw verify-releng
 
 - job-template:
     name: 'builder-merge'
diff --git a/jjb/verify-releng b/jjb/verify-releng
new file mode 100755 (executable)
index 0000000..6e980e7
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+source /opt/virtualenv/jenkins-job-builder/bin/activate
+jenkins-jobs test jjb/
+
+
+#test for non-ascii characters, these can pass the test and end up breaking things in production
+for x in $(find . -name *\.yml); do
+
+  if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then
+    echo "file "$x" contains non-ascii characters"
+    exit 1
+  fi
+
+done
+
+echo "all .yml files are ASCII only"