X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fpipeline-linter.sh;h=fad1f72c3b340e0a91cd5eeaf0a83fe697d70efe;hb=refs%2Fchanges%2F59%2F72659%2F3;hp=8ed681d5bffa1adffc032099ef6e44ce3da3c754;hpb=4c9d63d0cfb155b8e7ba9a08d6afd60e2b84e9a9;p=releng%2Fglobal-jjb.git diff --git a/shell/pipeline-linter.sh b/shell/pipeline-linter.sh index 8ed681d5..fad1f72c 100644 --- a/shell/pipeline-linter.sh +++ b/shell/pipeline-linter.sh @@ -18,8 +18,7 @@ JENKINS_VAL="$JENKINS_URL/pipeline-model-converter/validate" mapfile -t JENKINS_FILE_LIST < <(grep -lr "^pipeline\s*{" vars src Jenkinsfile*) exit_code=0 -for JENKINS_FILE in "${JENKINS_FILE_LIST[@]}" -do +for JENKINS_FILE in "${JENKINS_FILE_LIST[@]}"; do ret=$(curl --silent -X POST -H "$JENKINS_CRUMB" -F "jenkinsfile=<$JENKINS_FILE" "$JENKINS_VAL") if [[ $ret == *"Errors"* ]];then echo "ERROR: Linting error for $JENKINS_FILE"