aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/replay_batch.sh
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-07-02 12:13:04 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-07-02 16:14:34 +0200
commit5f9538c9a90d52cf29b7c58035fe2ff1ecb6375a (patch)
tree99b8392231c574664b4dbb286d9c5ab70796dfb8 /scripts/replay_batch.sh
parent2e2c1fbdc5f17b9d8577c7582139d7427c398589 (diff)
downloadsonarqube-5f9538c9a90d52cf29b7c58035fe2ff1ecb6375a.tar.gz
sonarqube-5f9538c9a90d52cf29b7c58035fe2ff1ecb6375a.zip
add ability to dump batch report enabled by sonar.batch.dumpReportDir
batch report dump are saved in the directory specified by the property sonar.batch.dumpReportDir and the batch is NOT pushed to the server
Diffstat (limited to 'scripts/replay_batch.sh')
-rwxr-xr-xscripts/replay_batch.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/replay_batch.sh b/scripts/replay_batch.sh
new file mode 100755
index 00000000000..c1bd9825016
--- /dev/null
+++ b/scripts/replay_batch.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -euo pipefail
+
+DUMP_DIR="/tmp/batch_dumps"
+SQ_ROOT_URL="http://localhost:9000"
+
+cd $DUMP_DIR
+for file in *.zip; do
+ base=${file%.zip}
+ url=$(cat ${base}.txt)
+ echo "base=$base, url=$url"
+
+ curl -u admin:admin -F report=@$DUMP_DIR/${base}.zip ${SQ_ROOT_URL}${url}
+done