X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finclude-raw-check-poms.sh;h=ed72f650c08b85551231a5a936008aed1940e89f;hb=5a42f4d1caae5ab66d72559d39fbaa7da21e9c64;hp=57e27a3e0bcac7c6e2bae75f83fa9540d690f4b0;hpb=bca0849e15cbd7997892447651f1c292923e47fb;p=releng%2Fbuilder.git diff --git a/jjb/include-raw-check-poms.sh b/jjb/include-raw-check-poms.sh index 57e27a3e0..ed72f650c 100644 --- a/jjb/include-raw-check-poms.sh +++ b/jjb/include-raw-check-poms.sh @@ -14,10 +14,10 @@ ############################################################################## # Clear workspace -rm -rf * +rm -rf -- "${WORKSPACE:?}"/* # Create python script to parse json -cat > ${WORKSPACE}/parse_json.py << EOF +cat > "${WORKSPACE}/parse_json.py" << EOF import json import sys @@ -30,8 +30,8 @@ EOF # Clone all ODL projects curl -s --header "Accept: application/json" \ https://git.opendaylight.org/gerrit/projects/ | \ - tail -n +2 > ${WORKSPACE}/projects.json -for p in `cat ${WORKSPACE}/projects.json | python ${WORKSPACE}/parse_json.py` + tail -n +2 > "${WORKSPACE}/projects.json" +for p in $(python "${WORKSPACE}/parse_json.py" < "${WORKSPACE}/projects.json") do # Ignore non-projects and archived projects if [ "$p" == "All-Users" ] || \ @@ -39,18 +39,20 @@ do [ "$p" == "integration" ] || \ [ "$p" == "net-virt-platform" ] || \ [ "$p" == "opendove" ] || \ - [ "$p" == "plugin2oc" ] + [ "$p" == "plugin2oc" ] || \ + # Also ignore projects known to deploy to non-ODL repositories + [ "$p" == "yangide" ] then continue fi - mkdir -p `dirname "$p"` + mkdir -p "$(dirname "$p")" git clone "https://git.opendaylight.org/gerrit/$p.git" "$p" done # Check pom.xml for and FILE=repos.txt -find . -name pom.xml | xargs grep -i '\|' > $FILE +find . -name pom.xml -print0 | xargs -0 grep -i '\|' > "$FILE" [[ $(tr -d "\r\n" < $FILE|wc -c) -eq 0 ]] && rm $FILE if [ -a $FILE ]