bm-viadee
(Björn Meschede)
July 15, 2018, 8:03pm
1
Hey,
I just tried to integrate sonarcloud with travis-ci in our sonarQuest project (https://github.com/viadee/sonarQuest ), but despite a successful build in travis somehow the results are not shown at sonarcloud.io :
The travis-file:
language: java
before_install: cd sonarQuest-backend
addons:
sonarcloud:
organization: "viadee"
token:
secure: "HlBvsN5OWhBqjswSBJIlk2R6CmlB8b/MotUJpHjPWR7Itipb/e+Zp9TSFJkAR5qGvBScTCQESS+lBdK9w1xMTCKpUuL/1PUi+sQaSHHZdkEkVZux3m5mpjW8pfRvTTWqZT7BKlFRninNB7SrajNCSYLHT8HgskfM2Ew8VkJEok+DTC4vZeBRlEzzyvhENw5U/dOPIU9JX8TX3f6aJ5Ni3nnkWCUPYf9coIVtTWATHJj1RbeZzjfn0NAhPYcQIYhgI1hedQWFRJzfH151pUykf7cYBB/uDo0iqsGrwsrw39r68AGDMe1S55U4rCF1pcZuMAo+lEsYoZw1E8JylJj1RbO0zGVoEXzXDP8mwwO2a7W4ndAMqNavOmaNtFrOEuKQFw8Ge1kDNLfTU+vm+8g6lY/vSyDCEaKJIHAMnbUxXSdQ6DTctn8ydJzlgOCW4XUzg2YW7YopM8nFav1vchnbeKrnkbIZNA4CVdT1e+D1R4xATUUOtVuwdmC/9K7gGcY3paE9zFR7kcInMWINNtPbisylOkY3Gag1dRAuAt9JKwpROCgIyIXFr9NnTaE+3LmLKfNdYpR8v10DCzSqyLX119xzxp2i9zY8syuxLluYPf9PwIZBj+kwSWhmMItsnNUo4PRWDMdNFDi0vh2jcAgJhB3G9mZgnLLTw6H+3Jdmlog="
before_script: cd sonarQuest-backend
script:
# the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
The travis build log lists no errors and features the SonarCloud-addon:
https://travis-ci.org/viadee/sonarQuest/builds/403755145
But the results are not shown on sonarcloud.io :
https://sonarcloud.io/dashboard?id=com.viadee%3AsonarQuest
Right now the only way to push results is to do it manually by running the maven build locally (which is how the existing two results were created).
Any ideas why this is not working?
Thanks in advance!
Björn
Godin
(Evgeny Mandrikov)
July 15, 2018, 10:47pm
2
In your build log https://travis-ci.org/viadee/sonarQuest/builds/403755145#L2385 you can notice that
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
is not executed. Most likely this is because you have two spaces in front of before_script:
and script:
1 Like
bm-viadee
(Björn Meschede)
July 16, 2018, 7:36am
3
Thanks a lot! That explains and as well fixes this problem.
How was that? “I thought we had tested everything …well, with the exception of whitespaces…”