X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fglobal%2Freleng-macros.yml;h=a7d947f81dc8edd724c103e4e94c094ba4b5e9e3;hb=1d30039496ef46a42c8d993260338c062c547a1a;hp=1c74732d555a02aee3de76628972838e14d384c1;hpb=92e57bfbd6e426c733e4687868b7637327c34958;p=releng.git diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 1c74732d5..a7d947f81 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -307,6 +307,7 @@ name: lint-init builders: - shell: | + #!/bin/bash # Ensure we start with a clean environment rm -f bash-violation.log python-violation.log yaml-violation.log violation.log git --no-pager diff --diff-filter=MCRAT --name-only HEAD^1 > modified_files @@ -315,10 +316,11 @@ name: lint-report builders: - shell: | + #!/bin/bash if [[ -s violation.log ]]; then echo "Reporting lint result..." msg="Found syntax error and/or coding style violation(s) in the files modified by your patchset." - sed -i -e '1s/^//$msg\n\n/' violation.log + sed -i -e "1s#^#${msg}\n\n#" violation.log cmd="gerrit review -p $GERRIT_PROJECT -m \"$(cat violation.log)\" $GERRIT_PATCHSET_REVISION --notify NONE" ssh -p 29418 gerrit.opnfv.org "$cmd" @@ -330,6 +332,7 @@ name: lint-bash-code builders: - shell: | + #!/bin/bash echo "Checking bash code..." for f in $(egrep '\.sh$' modified_files) do @@ -344,7 +347,8 @@ name: lint-python-code builders: - shell: | - # Install python packages + #!/bin/bash + # Install python package sudo pip install "flake8==2.6.2" echo "Checking python code..." @@ -361,6 +365,7 @@ name: lint-yaml-code builders: - shell: | + #!/bin/bash # sudo Install python packages sudo pip install "yamllint==1.8.2"