X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finclude-raw-check-poms.sh;h=57e27a3e0bcac7c6e2bae75f83fa9540d690f4b0;hb=5c68231090cfbb0dc9b9658929523b43dda5b65d;hp=a8bcbe32d5db813ef3012f957d1d129800f57d81;hpb=fe2f0942e22b3ea45480f2d69b3408f6505a2c0c;p=releng%2Fbuilder.git diff --git a/jjb/include-raw-check-poms.sh b/jjb/include-raw-check-poms.sh index a8bcbe32d..57e27a3e0 100644 --- a/jjb/include-raw-check-poms.sh +++ b/jjb/include-raw-check-poms.sh @@ -16,17 +16,41 @@ # Clear workspace rm -rf * +# Create python script to parse json +cat > ${WORKSPACE}/parse_json.py << EOF +import json +import sys + +obj=json.load(sys.stdin) +for key in obj.keys(): + print(key) + +EOF + # Clone all ODL projects -for p in `ssh -p 29418 git.opendaylight.org gerrit ls-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` do - mkdir -p `dirname "$p"` - git clone "https://git.opendaylight.org/gerrit/$p.git" "$p" + # Ignore non-projects and archived projects + if [ "$p" == "All-Users" ] || \ + [ "$p" == "affinity" ] || \ + [ "$p" == "integration" ] || \ + [ "$p" == "net-virt-platform" ] || \ + [ "$p" == "opendove" ] || \ + [ "$p" == "plugin2oc" ] + then + continue + fi + 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 | xargs grep -i '\|' > $FILE [[ $(tr -d "\r\n" < $FILE|wc -c) -eq 0 ]] && rm $FILE if [ -a $FILE ]