You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by ba...@apache.org on 2015/08/16 19:47:39 UTC
[22/23] couchdb-ci git commit: download jobs to Jenkins-compatible
structure
download jobs to Jenkins-compatible structure
Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/152dc1d3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/152dc1d3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/152dc1d3
Branch: refs/heads/master
Commit: 152dc1d3165d264c8012f61c0faa251b1ebf445d
Parents: 7286b57
Author: Bastian Krol <ba...@web.de>
Authored: Sun Aug 2 10:03:34 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sun Aug 2 10:03:34 2015 +0200
----------------------------------------------------------------------
scraping-jenkins/rename.sh | 10 ++++++----
scraping-jenkins/scrape.sh | 5 +++--
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/152dc1d3/scraping-jenkins/rename.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/rename.sh b/scraping-jenkins/rename.sh
index 30ae52c..32314ba 100755
--- a/scraping-jenkins/rename.sh
+++ b/scraping-jenkins/rename.sh
@@ -3,14 +3,16 @@ set -e
pushd `dirname $0`/jobs > /dev/null
+shopt -s nullglob # empty directory will return empty list
+
# convert to all-lower-case
-for i in *.config.xml; do
- mv "$i" "${i,,}" 2> /dev/null || true
+for dir in ./*/;do
+ mv "$dir" "${dir,,}" 2> /dev/null || true
done
# replace %20% by hyphen
-for i in *.config.xml; do
- mv "$i" "${i//%20/-}" 2> /dev/null || true
+for dir in ./*/;do
+ mv "$dir" "${dir//%20/-}" 2> /dev/null || true
done
popd > /dev/null
http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/152dc1d3/scraping-jenkins/scrape.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/scrape.sh b/scraping-jenkins/scrape.sh
index 781f20d..db801b8 100755
--- a/scraping-jenkins/scrape.sh
+++ b/scraping-jenkins/scrape.sh
@@ -25,11 +25,12 @@ mkdir -p jobs
while IFS='' read -r jobname || [[ -n $jobname ]]; do
echo "scraping job: $jobname"
- curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/jobs/$jobname/config.xml" > "jobs/$jobname.config.xml"
+ mkdir -p "jobs/$jobname"
+ curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/jobs/$jobname/config.xml" > "jobs/$jobname/config.xml"
done < jobnames.txt
# rename jobs to a sane naming pattern
./rename.sh
-pop > /dev/null
+popd > /dev/null