You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/runSonarQube.sh
+61-28Lines changed: 61 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,25 @@
1
1
#!/usr/bin/env bash
2
+
## This script Launches the benchmark, populates results on Sonarqube Dashboard and then fetch same results back from the SonarQube Server using SONAR Host,Project and Token
3
+
## This Script is totaly experimental. Tested Against SonarQube Enterprise Server version 9.9 LTS
4
+
## To run SonarQube benchmark you need to be on the /BenchmarkJava path and run ./scripts/runSonarQube.sh
2
5
3
6
source scripts/requireCommand.sh
4
7
5
8
requireCommand curl
6
9
requireCommand jq
7
10
8
11
# Check for install/updates at https://github.com/SonarSource/sonarqube
12
+
# This is Page size, If facing JQ Errors due to Long Arguments, Decrease this Number. Tested with SonarQube 9.9 LTS, 50 and 100 where producing lots of errors,
13
+
elements_per_request=20
9
14
10
-
if [ !-f scripts/SonarQubeCredentials.sh ];then
11
-
cat > scripts/SonarQubeCredentials.sh <<EOF
15
+
if [ !-f scripts/SonarQubeCredentials.sh ];then cat > scripts/SonarQubeCredentials.sh <<EOF
## WE ARE GOING TO DISCARD RULE CHERRY PICKING. SO ALL RESULTS ARE REPORTED REGARDLESS SO THAT BENCHMARK CAN POPULATE RESULTS & SCORE ACCORDINGLY.
46
+
## The content/data structure returned is controled by SONARQUEBE end server, Benchmark Script picks them accordingly and match them back to test cases and create the score.
47
+
## If returned data are not structured in a way expected by Benchmark/Score calculator. Example: CWE/DataPoint missed then results will not be counted/scored. This can end up in in-correct/Lower Score calculation.
## We are using two files to write results to. One as buffer the other as final to incrementally add results and swap in-between.
66
+
## This helps to have some sort of fault tolerance. If jq hits long argument or sonarqube sends back impaired data/empty for a single page, previous progress of result collection will not be erased/lost retroactively.
0 commit comments