diff options
author | KingPoo <haojingbo@huawei.com> | 2017-01-03 04:03:58 -0500 |
---|---|---|
committer | KingPoo <haojingbo@huawei.com> | 2017-01-03 04:03:58 -0500 |
commit | 51017785538b0447b78e6f6ed5f912c0c6b76eae (patch) | |
tree | aabaa10aae3dae61093c3ce2797e7bf7e03b076f | |
parent | 37f89bfd0f5860ecffcb347090b8d583fb633eac (diff) |
Add YAMLLint for static check
JIRA: OCTO-160
1)Install yamllint first in case pod didn't install. If installed, it would
info "already satisfied".
2)delete virtualenv of releng_yamllint.
Current CI commit gate is simple, just have flake8 check in part of projects,
it's better to apply more check tools to more projects.
Yaml files could be checked by YAMLLint when the project is configed in releng.
YAMLLint does not only check for syntax validity, but for weirdnesses like key
repetition and cosmetic problems such as lines length, trailing spaces, indentation,
etc.
Change-Id: I8591385ed32942e0af7f7afdde435313af5707e5
Signed-off-by: KingPoo <haojingbo@huawei.com>
-rw-r--r-- | jjb/global/releng-macros.yml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 7647a35d3..5b7ef5065 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -366,6 +366,9 @@ set -o xtrace export PATH=$PATH:/usr/local/bin/ + # install python packages + pip install "yamllint==1.6.0" + # generate and upload lint log echo "Running yaml code on $PROJECT ..." @@ -375,8 +378,6 @@ # Get number of yaml violations. If none, this will be an # empty string: "" find . \ - -path './releng_yamllint' -prune -o \ - -path './.tox' -prune -o \ -type f -name "*.yml" -print \ -o -name "*.yaml" -print | \ xargs yamllint > yaml-violation.log || true |