From: Alexandru Avadanii Date: Fri, 12 Jan 2018 22:18:00 +0000 (+0100) Subject: [PDF] check-jinja: Replace encrypted str w/ dummy X-Git-Tag: 6.0.0~28^2~1 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F31%2F50531%2F3;p=pharos.git [PDF] check-jinja: Replace encrypted str w/ dummy 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 --- diff --git a/config/utils/check-jinja2.sh b/config/utils/check-jinja2.sh index f23d389c..c33bef50 100755 --- a/config/utils/check-jinja2.sh +++ b/config/utils/check-jinja2.sh @@ -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