[PDF] check-jinja: Replace encrypted str w/ dummy 31/50531/3
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 12 Jan 2018 22:18:00 +0000 (23:18 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 14 Jan 2018 17:02:35 +0000 (18:02 +0100)
During PDF validation using `check-jinja.sh`, most if not all
encrypted strings will fail to decrypt due to missing keys on the
build server. The templater will fallback to using raw plaintext,
leading to `line too long` yamllint violations.

Since we don't care about the actual value of the unencrypted
string, replace the encrypted one with a dummy (shorter) string.

Change-Id: I0f96db0e055bf84ad43a1df4a0f2bd86cc50fd22
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
config/utils/check-jinja2.sh

index f23d389..c33bef5 100755 (executable)
@@ -43,7 +43,9 @@ while IFS= read -r lab_config; do
                 echo 'Result: PASS'
                 ((pdf_inst_pass+=1))
                 echo -e "\nyamllint -s ${jinja_template%.j2}"
-                if yamllint -s "${TMPF}"; then ((pdf_yaml_pass+=1)); fi
+                if yamllint -s <(sed 's|ENC\[PKCS.*\]|opnfv|g' "${TMPF}"); then
+                    ((pdf_yaml_pass+=1));
+                fi
             else
                 echo 'Result: FAIL'
                 RC=1