diff options
author | 2018-06-28 20:53:52 +0000 | |
---|---|---|
committer | 2018-06-28 20:53:52 +0000 | |
commit | c84b13a3b4259dfb450cde4ed3e9a0be6d3328bf (patch) | |
tree | a1597e2a0a295250e3b201e3c014ce04450e1727 /ci | |
parent | 24d2216cc14e1022ffee04bcfe4bba8fa0357ba0 (diff) | |
parent | 389ec03b1e691911d0b58a186dc19f4bc18626a7 (diff) |
Merge "ci: Support for pylint and yamllint" into stable/fraser
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/build-auto.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ci/build-auto.sh b/ci/build-auto.sh index 611d83a..96588b9 100755 --- a/ci/build-auto.sh +++ b/ci/build-auto.sh @@ -30,6 +30,7 @@ # EXIT=0 EXIT_UNKNOWN_JOB_TYPE=1 +EXIT_LINT_FAILED=2 # # configuration @@ -37,6 +38,16 @@ EXIT_UNKNOWN_JOB_TYPE=1 AUTOENV_DIR="$HOME/autoenv" # +# functions +# +# execute pylint and yamllint to check code quality +function execute_auto_lint_check() { + if ! ./check -b ; then + EXIT=$EXIT_LINT_FAILED + fi +} + +# # main # echo @@ -69,7 +80,7 @@ case $1 in # Example of verify job body. Functions can call # external scripts, etc. - #execute_auto_pylint_check + execute_auto_lint_check #execute_auto_doc_check #install_opnfv MCP #install_onap @@ -87,14 +98,14 @@ case $1 in # Example of merge job body. Functions can call # external scripts, etc. - #execute_auto_pylint_check + execute_auto_lint_check #execute_auto_doc_check #install_opnfv MCP #install_onap #execute_sanity_check #execute_tests $1 - # Everything went well, so report SUCCESS to Jenkins + # propagate result to the Jenkins job exit $EXIT ;; "daily") @@ -111,7 +122,7 @@ case $1 in #execute_tests $1 #push_results_and_logs_to_artifactory - # Everything went well, so report SUCCESS to Jenkins + # propagate result to the Jenkins job exit $EXIT ;; *) |